This section lists the system monitor data elements that can be monitored for DB2 Connect in DB2 Universal Database Version 5.2. These data elements fall into two groupings:
These DB2 Connect data elements (both existing and new) will be returned in the following data structures. These data structures also fall into two categories:
Note: | The data structures are defined in the sqlmon.h header file. |
The following commands associated with system monitoring have been enhanced to return more DB2 Connect information:
For command details see the Command Reference.
The following table lists the Version 5 system monitor data elements that can collect DB2 Connect information starting in Version 5.2. These data elements will be returned in the data structures listed in the API Structure column in Version 5.2, in addition to their original Version 5 data structures.
Note: | You should refer to the Version 5 System Monitor Guide and Reference for detailed information on these data elements. |
Data Element | API Element Name | Level | API Structure |
---|---|---|---|
Database Identification and Status | |||
Database Name | db_name |
DCS Database DCS Application |
sqlm_dcs_dbase sqlm_dcs_applid_info |
Application Identification and Status | |||
Application Handle (agent ID) | agent_id | DCS Application | sqlm_dcs_applid_info |
ID of Code Page Used by Application | codepage_id | DCS Application | sqlm_dcs_applid_info |
Application Status Change Time | status_change_time | DCS Application | sqlm_dcs_applid_info |
User Login ID | execution_id | DCS Application | sqlm_dcs_applid_info |
Client Process ID | client_pid | DCS Application | sqlm_dcs_applid_info |
Client Operating Platform | client_platform | DCS Application | sqlm_dcs_applid_info |
Client Communication Protocol | client_protocol | DCS Application | sqlm_dcs_applid_info |
Previous Unit of Work Completion Timestamp | prev_uow_stop_time | DCS Application | sqlm_dcs_appl |
Unit of Work Start Timestamp | uow_start_time | DCS Application | sqlm_dcs_appl |
Unit of Work Stop Timestamp | uow_stop_time | DCS Application | sqlm_dcs_appl |
Unit of Work Completion Status | uow_comp_status | DCS Application | sqlm_dcs_appl |
Application Idle Time | appl_idle_time | DCS Application | sqlm_dcs_appl |
SQL Statement Activity | |||
Failed Statement Operations | failed_sql_stmts |
DCS Database DCS Application |
sqlm_dcs_dbase sqlm_dcs_appl_stats |
Commit Statements Attempted | commit_sql_stmts |
DCS Database DCS Application |
sqlm_dcs_dbase sqlm_dcs_appl_stats |
Rollback Statements Attempted | rollback_sql_stmts |
DCS Database DCS Application |
sqlm_dcs_dbase sqlm_dcs_appl_stats |
SQL Statement Details | |||
Statement Operation | stmt_operation |
DCS Application DCS Statement |
sqlm_dcs_appl sqlm_dcs_stmt |
Package Name | package_name |
DCS Application DCS Statement |
sqlm_dcs_appl sqlm_dcs_stmt |
Section Number | section_number |
DCS Application DCS Statement |
sqlm_dcs_appl sqlm_dcs_stmt |
Application Creator | creator |
DCS Application DCS Statement |
sqlm_dcs_appl sqlm_dcs_stmt |
Statement Operation Start Timestamp | stmt_start |
DCS Application DCS Statement |
sqlm_dcs_appl sqlm_dcs_stmt |
Statement Operation Stop Timestamp | stmt_stop |
DCS Application DCS Statement |
sqlm_dcs_appl sqlm_dcs_stmt |
SQL Dynamic Statement Text | n/a | DCS Statement | sqlm_dcs_stmt |
Number of Successful Fetches | fetch_count | DCS Statement | sqlm_dcs_stmt |
Query Cost Estimate | query_cost_estimate | DCS Statement | sqlm_dcs_stmt |
Query Number of Rows Estimate | query_card_estimate | DCS Statement | sqlm_dcs_stmt |
SQL Snapshot Monitor Elements | |||
Last Reset Timestamp | last_reset |
DCS Database DCS Application |
sqlm_dcs_dbase sqlm_dcs_appl |
This section lists all the new Version 5.2 data elements that can be monitored for DB2 Connect. You should refer to the Version 5 System Monitor Guide and Reference for instructions on how to collect information with the DB2 system monitor.
Snapshot Information Level DCS Database DCS Application |
API Structure(s) sqlm_dcs_dbase sqlm_dcs_applid_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
dcs_db_name information | |
Related Information |
|
Description: The name of the DCS database as catalogued in the DCS directory.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level DCS Database DCS Application |
API Structure(s) sqlm_dcs_dbase sqlm_dcs_applid_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
host_db_name information | |
Related Information |
|
Description: The real name of the host database for which information is being collected or to which the application is connected. This is the name that was given to the database when it was created.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_applid_info |
Monitor Switch Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_db_alias information | |
Related Information |
|
Description: The alias used at the DB2 Connect gateway to connect to the host database.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level DCS Database DCS Application |
API Structure(s) sqlm_dcs_dbase sqlm_dcs_appl |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_con_time timestamp | |
Related Information |
|
Description: The date and time of the first connection to the host database from the DB2 Connect gateway.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level DCS Database |
API Structure(s) sqlm_dcs_dbase |
Monitor Switch Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_connections_top water mark | |
Related Information |
|
Description: The maximum number of concurrent connections to a host database that have been handled by the DB2 Connect gateway since the first database connection.
Usage: This element will help you understand the level of activity at the DB2 Connect gateway and the associated use of system resources.
Snapshot Information Level Database Manager DCS Database |
API Structure(s) sqlm_db2 sqlm_dcs_dbase |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_total_cons water mark | |
Related Information |
|
Description: The total number of connections for DB2 Connect attempted at the DB2 Connect gateway since the db2start command or the last reset.
Usage: This element will help you understand the level of activity at the DB2 Connect gateway and the associated use of system resources.
Snapshot Information Level Database Manager DCS Database |
API Structure(s) sqlm_db2 sqlm_dcs_dbase |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_cur_cons gauge | |
Related Information |
|
Description: The current number of connections to host databases being handled by the DB2 Connect gateway.
Usage: This element will help you understand the level of activity at the DB2 Connect gateway and the associated use of system resources.
Snapshot Information Level Database Manager DCS Database |
API Structure(s) sqlm_db2 sqlm_dcs_dbase |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_cons_wait_host gauge | |
Related Information |
|
Description: The current number of connections to host databases being handled by the DB2 Connect gateway that are waiting for a reply from the host.
Usage: This value can change frequently. It should be sampled at regular intervals over an extended period in order to obtain a realistic view of gateway usage.
Snapshot Information Level Database Manager DCS Database |
API Structure(s) sqlm_db2 sqlm_dcs_dbase |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
gw_cons_wait_client gauge | |
Related Information |
|
Description: The current number of connections to host databases being handled by the DB2 Connect gateway that are waiting for the client to send a request.
Usage: This value can change frequently. It should be sampled at regular intervals over an extended period in order to obtain a realistic view of gateway usage.
Snapshot Information Level DCS Application DCS Statement |
API Structure(s) sqlm_dcs_appl sqlm_dcs_stmt |
Monitor Switch Statement Statement |
Resettable |
Yes (at application) No (at other levels) |
|
API Element Name Element Type |
gw_exec_time time | |
Related Information |
|
Description: The time (in microseconds) at the DB2 Connect gateway to process an application request (since the connection was established), or to process a single statement.
Usage: Use this element to determine what portion of the overall processing time is due to DB2 Connect gateway processing.
Snapshot Information Level DCS Database DCS Application |
API Structure(s) sqlm_dcs_dbase sqlm_dcs_appl |
Monitor Switch Basic Basic |
Resettable |
Yes |
|
API Element Name Element Type |
sql_stmts counter | |
Related Information |
|
Description: The number of SQL statements that have been attempted since the latter of: application start up, database activation, or last reset.
Usage: Use this element to measure database activity at the database or application level. To calculate the SQL statement throughput for a given period, you can divide this element by the elapsed time between two snapshots.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_appl |
Monitor Switch Basic |
Resettable |
No |
|
API Element Name Element Type |
open_cursors gauge | |
Related Information |
|
Description: The number of cursors currently open for an application.
Usage: Use this element to assess how much memory is being allocated. The amount of memory allocated by the DB2 client, DB2 Connect, or the database agent on the target database is related to the number of cursors that are currently open. Knowing this information can help with capacity planning. For example, each open cursor that is doing blocking has a buffer size of RQRIOBLK. If deferred_prepare is enabled, then two buffers will be allocated.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_applinfo |
Monitor Switch Basic |
Resettable |
No |
|
API Element Name Element Type |
dcs_appl_status information | |
Related Information |
|
Description: The status of a DCS application at the DB2 Connect gateway.
Usage: Use this element for problem determination on DCS applications. Values are:
(2) The DB2 Connect gateway is waiting on behalf of the unit of work in the application. This usually means that the application's code is being executed.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_applid_info |
Monitor Switch Basic |
Resettable |
No |
|
API Element Name Element Type |
host_ccsid information | |
Related Information |
|
Description: This is the coded character set identifier (CCSID) of the host database.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_applinfo sqlm_dcs_applid_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
outbound_comm_protocol information | |
Related Information |
|
Description: The communication protocol used between the DB2 Connect gateway and the host.
Usage: Use this element for problem determination on DCS applications. Valid values are:
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_applinfo sqlm_dcs_applid_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
outbound_comm_address information | |
Related Information |
|
Description: This is the communication address of the target database. For example, it could be an SNA net ID and LU partner name, or an IP address and port number for TCP/IP.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_applinfo sqlm_dcs_applid_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
inbound_comm_address information | |
Related Information |
|
Description: This is the communication address of the client. For example, it could be an SNA net ID and LU partner name, or an IP address and port number for TCP/IP.
Usage: Use this element for problem determination on DCS applications.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_appl sqlm_dcs_stmt |
Monitor Switch Basic Statement |
Resettable |
Yes |
|
API Element Name Element Type |
inbound_bytes_received counter | |
Related Information |
|
Description: The number of bytes received by the DB2 Connect gateway from the client, excluding communication protocol overhead (for example, TCP/IP or SNA headers).
Usage: Use this element to measure the throughput from the client to the DB2 Connect gateway.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_appl sqlm_dcs_stmt |
Monitor Switch Basic Statement |
Resettable |
Yes |
|
API Element Name Element Type |
outbound_bytes_sent counter | |
Related Information |
|
Description: The number of bytes sent by the DB2 Connect gateway to the host, excluding communication protocol overhead (for example, TCP/IP or SNA headers).
Usage: Use this element to measure the throughput from the DB2 Connect gateway to the host database.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_appl sqlm_dcs_stmt |
Monitor Switch Basic Statement |
Resettable |
Yes |
|
API Element Name Element Type |
outbound_bytes_received counter | |
Related Information |
|
Description: The number of bytes received by the DB2 Connect gateway from the host, excluding communication protocol overhead (for example, TCP/IP or SNA headers).
Usage: Use this element to measure the throughput from the host databases to the DB2 Connect gateway.
Snapshot Information Level DCS Application |
API Structure(s) sqlm_dcs_appl sqlm_dcs_stmt |
Monitor Switch Basic Statement |
Resettable |
Yes |
|
API Element Name Element Type |
inbound_bytes_sent counter | |
Related Information |
|
Description: The number of bytes sent by the DB2 Connect gateway to the client, excluding communication protocol overhead (for example, TCP/IP or SNA headers).
Usage: Use this element to measure the throughput from the DB2 Connect gateway to the client.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_appl_xid sqlm_appl_xid |
Monitor Switch Unit of Work Unit of Work |
Resettable |
No |
|
API Element Name Element Type |
xid information | |
Related Information |
|
Description: A unique transaction identifier (across all databases) generated by a transaction manager in a two-phase commit transaction.
Usage: This identifier can be used to correlate the transaction generated by the transaction manager with the transactions executed against multiple databases. It can be used to help diagnose transaction manager problems by tying database transactions involving a two-phase commit protocol with the transactions originated by the transaction manager.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_tpmon_info sqlm_tpmon_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
tpmon_client_userid information | |
Related Information |
|
Description: The client user ID generated by a transaction manager and provided to the server, if the sqleseti API is used.
Usage: Use this element in application server or TP monitor environments to identify the end-user for whom the transaction is being executed.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_tpmon_info sqlm_tpmon_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
tpmon_client_wkstn information | |
Related Information |
|
Description: Identifies the client's system or workstation (for example CICS EITERMID), if the sqleseti API was issued in this connection.
Usage: Use this element to identify the user's machine by node ID, terminal ID, or similar identifiers.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_tpmon_info sqlm_tpmon_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
tpmon_client_app information | |
Related Information |
|
Description: Identifies the the server transaction program performing the transaction, if the sqleseti API was issued in this connection.
Usage: Use this element for problem determination and accounting purposes.
Snapshot Information Level Application DCS Application |
API Structure(s) sqlm_tpmon_info sqlm_tpmon_info |
Monitor Switch Basic Basic |
Resettable |
No |
|
API Element Name Element Type |
acc_str_length acc_str_offset information | |
Related Information |
|
Description: The data passed to the target database for logging and diagnostic purposes, if the sqleseti API was issued in this connection.
Note: | Two variables in the sqlm_tpmon_info data structure are used to
determine the TP monitor client accounting string:
|
Usage: Use this element for problem determination and accounting purposes.
In a transaction monitor or application server (multi-tier) environment, application users do not issue SQL requests directly. Instead, they request the transaction processor monitor (for example, CICS, TUXEDO, or ENCINA running on a UNIX, OS/2, or Windows NT server) or application server to execute a business transaction. Each business transaction is an application part that issues SQL requests to the database server. Because the SQL requests are issued by an intermediate server, the database server has no information about the original client that caused the execution of the SQL request.
Developers of transaction processor monitor (TP monitor) transactions or application server code can use the sqleseti - Set Client Information API to provide information about the original client to the database server. This information can be found in the following data elements: