MON_GET_CONNECTION_DETAILS 表函数 - 获取连接度量值(采用 XML 文档格式)

MON_GET_CONNECTION_DETAILS 表函数返回一个或多个连接的指标。

将在 XML 文档中返回指标。

权限

需要下列其中一项权限才能执行此例程:
  • 对例程的 EXECUTE 特权
  • DATAACCESS 权限
  • DBADM 权限
  • SQLADM 权限

缺省 PUBLIC 特权

语法

Read syntax diagramSkip visual syntax diagramMON_GET_CONNECTION_DETAILS(application_handle ,member ,system_appls )

模式为 SYSPROC。

例程参数

application_handle
类型为 BIGINT 的输入参数,用于指定特定应用程序句柄,用于标识要为其返回度量值的连接。 如果自变量为 NULL ,那么将返回所有连接的度量值。
成员
类型为 INTEGER 的输入自变量,调用此函数时,此自变量指定与当前连接的数据库位于同一实例中的有效成员。 指定 -1(表示当前数据库成员)或 -2(表示所有活动数据库成员)。 如果指定空值,那么会隐式设置 -1。
系统应用程序
数据类型为 SMALLINT 的输入参数,用于指定是否返回系统应用程序的信息。 以下值有效:
  • 0 或 NULL:不返回系统应用程序信息。 如果未提供 system_appls 的值,那么 NULL 是缺省值。
  • 1:返回用户和系统应用程序信息。

返回的信息

表 1. 针对 MON_GET_CONNECTION_DETAILS 返回的信息
列名 数据类型 描述
APPLICATION_HANDLE BIGINT application_handle - 应用程序句柄
MEMBER SMALLINT 成员-数据库成员
详细信息 BLOB(1M) 包含工作单元详细度量的 XML 文档。 请参阅 表 2 以获取本文档中元素的描述。
以下示例显示在 DETAILS 列中返回的 XML 文档的结构。
<db2_connection xmlns="http://www.ibm.com/xmlns/prod/db2/mon" release="90700000">
   <application_handle>21</application_handle>
   <member>0</member>
   <system_metrics release="90700000">
   <act_aborted_total>5</act_aborted_total>
   ...
   <wlm_queue_assignments_total>3</wlm_queue_assignments_total>
   </system_metrics>
</db2_connection>
对于完整模式,请参阅 sqllib/misc/DB2MonRoutines.xsd
此文档使用以下非基本 XML 类型定义:
<xs:simpleType name="db2DbObjectString">
   <xs:restriction base="xs:string">
      <xs:maxLength value="128"/>
   </xs:restriction>
</xs:simpleType>

<xs:simpleType name="db2PartitionNum">
   <xs:restriction base="xs:nonNegativeInteger">
      <xs:maxInclusive value="999"/>
   </xs:restriction>
</xs:simpleType>

表 2. 针对 MON_GET_CONNECTION_DETAILS 返回的详细指标
元素名称 数据类型 描述
act_aborted_total xs:nonNegativeInteger act_aborted_total - 异常终止活动总数
act_completed_total xs:nonNegativeInteger act_completed_total - 完成活动总数
act_rejected_total xs:nonNegativeInteger act_rejected_total - 被拒绝活动总数
act_rqsts_total xs:nonNegativeInteger act_rqsts_total - 活动请求总数
active_col_vector_consumers xs:long active_col_vector_services-活动 columnar_vector 使用者
active_hash_grpbys xs:long active_hash_grpbys - 活动散列 GROUP BY 操作次数
active_hash_joins xs:long active_hash_joins - 活动散列连接数
active_olap_funcs xs:long active_olap_funcs - 活动 OLAP 函数
active_peas xs:long active_peas-活动部分提前聚集操作
active_peds xs:long active_peds - 活动部分提前相异操作次数
active_sort_consumers xs:long active_sort_members-活动排序使用者
active_sorts xs:long active_sorts - 活动排序数
adm_bypass_act_total xs:long 保留以供将来使用。
adm_overflows xs:long 保留以供将来使用。
agent_id xs:nonNegativeInteger agent_id -“应用程序句柄(代理程序标识)”监视元素
agent_wait_time xs:nonNegativeInteger agent_wait_time - 代理程序等待时间
agent_waits_total xs:nonNegativeInteger agent_waits_total - 等待代理程序总次数
app_act_aborted_total xs:nonNegativeInteger app_act_aborted_total - 失败的外部协调程序活动总数
app_act_completed_total xs:nonNegativeInteger app_act_completed_total - 成功的外部协调程序活动总数
app_act_rejected_total xs:nonNegativeInteger app_act_rejected_total - 拒绝的外部协调程序活动总数
app_rqsts_completed_total xs:nonNegativeInteger app_rqsts_completed_total - 完成应用程序请求总数
appl_section_inserts xs:nonNegativeInteger appl_section_insert-"SQL 工作空间的插入计数" 监视元素
appl_section_lookups xs:nonNegativeInteger appl_section_lookups-"SQL 工作空间访问计数" 监视元素
application_handle xs:nonNegativeInteger application_handle - 应用程序句柄
application_id xs:string appl_id - 应用程序标识
application_name xs:string appl_name - 应用程序名称
associated_agents_top xs:long associated_agents_top -“最大关联代理程序数”监视元素
audit_events_total xs:nonNegativeInteger audit_events_total - 审计事件总数
audit_file_write_wait_time xs:nonNegativeInteger audit_file_write_wait_time - 审计文件写等待时间
audit_file_writes_total xs:nonNegativeInteger audit_file_writes_total - 写审计文件总次数
audit_subsystem_wait_time xs:nonNegativeInteger audit_subsystem_wait_time - 审计子系统等待时间
audit_subsystem_waits_total xs:nonNegativeInteger audit_subsystem_waits_total - 审计子系统等待总次数
binds_precompiles xs:long binds_precompiles -“尝试的绑定次数/预编译次数”监视元素
call_sql_stmts xs:long call_sql_stmts-已执行 CALL SQL 语句
cat_cache_inserts xs:nonNegativeInteger cat_cache_inserts - 目录高速缓存插入数
cat_cache_lookups xs:nonNegativeInteger cat_cache_lookups - 目录高速缓存查询数
client_acctng xs: string (255) client_acctng - 客户机记帐字符串
client_applname xs: string (255) client_applname - 客户机应用程序名称
client_hostname xs:string client_hostname - 客户机主机名
client_idle_wait_time xs:nonNegativeInteger client_idle_wait_time - 客户机空闲等待时间
client_ipaddr xs:string client_ipaddr -“客户机 IP 地址”监视元素
client_pid xs:nonNegativeInteger client_pid - 客户机进程标识
client_platform xs:string client_platform-客户机平台
client_port_number xs:nonNegativeInteger client_port_number - 客户机端口号
client_prdid xs:string client_prdid - 客户机产品和版本标识
client_protocol xs:string client_protocol - 客户机通信协议
client_userid xs: string (255) client_userid - 客户机用户标识
client_wrkstnname xs: string (255) client_wrkstnname - 客户机工作站名称
col_synopsis_rows_inserted xs:nonNegativeInteger col_synopsis_rows_inserted -“插入的列组织概要表行数”监视元素
col_vector_consumer_overflows xs:long col_vector_consumer_overflows-"Columnar 向量使用者溢出数" 监视元素。
comm_exit_wait_time xs:nonNegativeInteger comm_exit_wait_time -“通信缓冲区出口等待时间”监视元素
comm_exit_waits xs:nonNegativeInteger comm_exit_waits -“通信缓冲区出口等待数”监视元素
connection_reusability_status xs:short connection_reusability_status -“连接可复用性状态”监视元素
connection_start_time xs:dateTime connection_start_time - 连接开始时间
coord_member xs:short coord_member-协调成员
current_isolation xs:string current_isolation - 当前隔离级别
ddl_sql_stmts xs:long ddl_sql_stmts -“数据定义语言 (DDL) SQL 语句数”监视元素
死锁 xs:nonNegativeInteger deadlocks - 检测到的死锁数
diaglog_write_wait_time xs:nonNegativeInteger diaglog_write_wait_time-Diag 日志写入时间
diaglog_writes_total xs:nonNegativeInteger diaglog_writes_total-Diag 日志总写入数
direct_read_reqs xs:nonNegativeInteger direct_read_reqs - 直接读请求数
direct_read_time xs:nonNegativeInteger direct_read_time - 直接读时间
direct_reads xs:nonNegativeInteger direct_reads - 直接读取数据库的次数
direct_write_reqs xs:nonNegativeInteger direct_write_reqs - 直接写请求数
direct_write_time xs:nonNegativeInteger direct_write_time - 直接写时间
direct_writes xs:nonNegativeInteger direct_writes - 直接写至数据库的次数
disabled_peds xs:long disabled_peds - 已禁用部分提前相异数
dynamic_sql_stmts xs:long dynamic_sql_stmts -“尝试的动态 SQL 语句数”监视元素
evmon_wait_time xs:nonNegativeInteger evmon_wait_time - 事件监视器等待时间
evmon_waits_total xs:nonNegativeInteger evmon_waits_total - 事件监视器总等待时间
execution_id xs:string(128) execution_id - 用户登录标识监视元素
ext_table_read_volume xs:nonNegativeInteger ext_table_read_volume -“外部表阅读器读取的数据总量”监视元素
ext_table_recv_volume xs:nonNegativeInteger ext_table_recv_volume -“从外部表阅读器接收到的数据总量”监视元素
ext_table_recv_wait_time xs:nonNegativeInteger ext_table_recv_wait_time -“代理程序等待外部表阅读器的时间总量”监视元素
ext_table_recvs_total xs:nonNegativeInteger ext_table_recvs_total -“从外部表阅读器接收到的行批处理总数”监视元素
ext_table_send_volume xs:nonNegativeInteger ext_table_send_volume -“发送至外部表写程序的数据总量”监视元素
ext_table_send_wait_time xs:nonNegativeInteger ext_table_send_wait_time -“代理程序等待外部表写程序的时间总量”监视元素
ext_table_sends_total xs:nonNegativeInteger ext_table_sends_total -“发送至外部表写程序的行批处理总数”监视元素
ext_table_write_volume xs:nonNegativeInteger ext_table_write_volume -“外部表写程序写入的数据总量”监视元素
failed_sql_stmts xs:long failed_sql_stmts - 失败的语句操作数监视元素
fcm_message_recv_volume xs:nonNegativeInteger fcm_message_recv_volume-FCM 消息接收卷
fcm_message_recv_wait_time xs:nonNegativeInteger fcm_message_recv_wait_time-FCM 消息接收等待时间
fcm_message_recv_waits_total xs:nonNegativeInteger fcm_message_recv_waits_total -“等待 FCM 回复消息所花时间”监视元素
fcm_message_recvs_total xs:nonNegativeInteger fcm_message_recvs_total-FCM 消息接收总数
fcm_message_send_volume xs:nonNegativeInteger fcm_message_send_volume - 发送 FCM 消息量
fcm_message_send_wait_time xs:nonNegativeInteger fcm_message_send_wait_time - 发送 FCM 消息等待时间
fcm_message_send_waits_total xs:nonNegativeInteger fcm_message_send_waits_total -“执行 FCM 消息发送操作时被阻塞的时间”监视元素
fcm_message_sends_total xs:nonNegativeInteger fcm_message_sends_total-FCM 消息发送总数
fcm_recv_volume xs:nonNegativeInteger fcm_recv_volume-FCM 接收卷
fcm_recv_wait_time xs:nonNegativeInteger fcm_recv_wait_time-FCM 接收等待时间
fcm_recv_waits_total xs:nonNegativeInteger fcm_recv_waits_total -“等待通过 FCM 接收数据所花时间”监视元素
fcm_recvs_total xs:nonNegativeInteger fcm_recvs_total-FCM 接收总次数
fcm_send_volume xs:nonNegativeInteger fcm_send_volume - FCM 发送量
fcm_send_wait_time xs:nonNegativeInteger fcm_send_wait_time - FCM 发送等待时间
fcm_send_waits_total xs:nonNegativeInteger fcm_send_waits_total -“执行 FCM 发送操作时被阻塞的时间”监视元素
fcm_sends_total xs:nonNegativeInteger fcm_sends_total - FCM 发送总计
fcm_tq_recv_volume xs:nonNegativeInteger fcm_tq_recv_volume-FCM 表队列接收卷
fcm_tq_recv_wait_time xs:nonNegativeInteger fcm_tq_recv_wait_time-FCM 表队列接收等待时间
fcm_tq_recv_waits_total xs:nonNegativeInteger fcm_tq_recv_waits_total -“等待接收下一个缓冲区所花时间”监视元素
fcm_tq_recvs_total xs:nonNegativeInteger fcm_tq_recvs_total-FCM 表队列接收总数
fcm_tq_send_volume xs:nonNegativeInteger fcm_tq_send_volume-FCM 表队列发送卷
fcm_tq_send_wait_time xs:nonNegativeInteger fcm_tq_send_wait_time-FCM 表队列发送等待时间
fcm_tq_send_waits_total xs:nonNegativeInteger fcm_tq_send_waits_total -“等待发送下一个缓冲区所花时间”监视元素
fcm_tq_sends_total xs:nonNegativeInteger fcm_tq_sends_total-FCM 表队列发送总数
fed_rows_deleted xs:nonNegativeInteger fed_rows_deleted -“联合系统删除的行数”监视元素
fed_rows_inserted xs:nonNegativeInteger fed_rows_inserted -“联合系统插入的行数”监视元素
fed_rows_read xs:nonNegativeInteger fed_rows_read -“联合系统读取的行数”监视元素
fed_rows_updated xs:nonNegativeInteger fed_rows_updated -“联合系统更新的行数”监视元素
fed_wait_time xs:nonNegativeInteger fed_wait_time -“联合服务器所花费的时间”监视元素
fed_waits_total xs:nonNegativeInteger fed_waits_total -“联合服务器的总执行时间”监视元素
hash_grpby_overflows xs:long hash_grpby_overflows - 散列 GROUP BY 溢出次数
hash_join_overflows xs:long hash_join_overflows -“散列连接溢出数”监视元素
hash_join_small_overflows xs:long hash_join_small_overflows -“散列连接小溢出数”监视元素
ida_recv_volume xs:long ida_recv_volume -“接收的总数据量”监视元素
ida_recv_wait_time xs:long ida_recv_wait_time -“等待接收数据时所耗用的时间”监视元素
ida_recvs_total xs:long ida_recvs_total -“接收数据的次数”监视元素
ida_send_volume xs:long ida_send_volume -“发送的总数据量”监视元素
ida_send_wait_time xs:long ida_send_wait_time -“等待发送数据时所耗用的时间”监视元素
ida_sends_total xs:long ida_sends_total -“发送数据的次数”监视元素
implicit_rebinds xs:long implicit_rebind-隐式重新绑定数
int_commits xs:nonNegativeInteger int_commits - 内部落实数
int_rollbacks xs:nonNegativeInteger int_rollbacks - 内部回滚
int_rows_deleted xs:long int_rows_deleted -“删除的内部行数”监视元素
int_rows_inserted xs:long int_rows_inserted - 插入的内部行数监视元素
int_rows_updated xs:long int_rows_updated -“更新的内部行数”监视元素
intra_parallel_state xs:string intra_parallel_state -“分区内并行性的当前状态”监视元素
ipc_recv_volume xs:nonNegativeInteger ipc_recv_volume-进程间通信接收卷
ipc_recv_wait_time xs:nonNegativeInteger ipc_recv_wait_time-进程间通信接收等待时间
ipc_recvs_total xs:nonNegativeInteger ipc_recvs_total-进程间通信接收总数
ipc_send_volume xs:nonNegativeInteger ipc_send_volume - 进程间通信发送量
ipc_send_wait_time xs:nonNegativeInteger ipc_send_wait_time - 进程间通信发送等待时间
ipc_sends_total xs:nonNegativeInteger ipc_sends_total - 进程间通信发送总次数
is_system_appl xs:short is_system_appl -“是系统应用程序”监视元素
last_executable_id xs:hexBinary(32) last_executable_id - 上一个可执行文件标识
last_request_type xs:string(32) last_request_type - 上一个请求类型
lob_prefetch_reqs xs:nonNegativeInteger lob_prefetch_reqs -“LOB 预取程序请求计数”监视元素
lob_prefetch_wait_time xs:nonNegativeInteger lob_prefetch_wait_time-"LOB 预取等待时间" 监视元素
lock_escals xs:nonNegativeInteger lock_escals - 锁定升级次数
lock_timeout_val xs:long lock_timeout_val -“锁定超时值”监视元素
lock_timeouts xs:nonNegativeInteger lock_timeouts - 锁定超时次数
lock_wait_time xs:nonNegativeInteger lock_wait_time - 等待锁定时间
lock_waits xs:nonNegativeInteger lock_waits - 等待锁定次数
log_buffer_wait_time xs:nonNegativeInteger log_buffer_wait_time - 日志缓冲区等待时间
log_disk_wait_time xs:nonNegativeInteger log_disk_wait_time - 日志磁盘等待时间
log_disk_waits_total xs:nonNegativeInteger log_disk_waits_total-日志磁盘等待总数
成员 xs:nonNegativeInteger 成员-数据库成员
member_subset_id xs:long member_subset_id - 成员子集标识
merge_sql_stmts xs:long merge_sql_stmts-已执行的合并 SQL 语句数
num_assoc_agents xs:long num_assoc_agents -“关联代理程序数”监视元素
num_locks_held xs:nonNegativeInteger locks_held - 挂起的锁定数
num_locks_waiting xs:long locks_waiting -“当前正在等待锁定的代理程序数”监视元素
num_log_buffer_full xs:nonNegativeInteger num_log_buffer_full - 完整日志缓冲区的数量
num_lw_thresh_exceeded xs:nonNegativeInteger num_lw_thresh_out- 超出阈值数
olap_func_overflows xs:long olap_func_overflows -“OLAP 函数溢出次数”监视元素
pkg_cache_inserts xs:nonNegativeInteger pkg_cache_inserts - 程序包高速缓存插入数
pkg_cache_lookups xs:nonNegativeInteger pkg_cache_lookups - 程序包高速缓存查询数
pool_col_gbp_indep_pages_found_in_lbp xs:nonNegativeInteger pool_col_gbp_indep_pages_found_in_lbp - 本地缓冲池中发现的独立于缓冲池按列组织 GBP 的页面数
pool_col_gbp_invalid_pages xs:nonNegativeInteger pool_col_gbp_invalid_pages - 缓冲池按列组织 GBP 无效数据页面数
pool_col_gbp_l_reads xs:nonNegativeInteger pool_col_gbp_l_reads - 缓冲池按列组织 GBP 逻辑读取次数
pool_col_gbp_p_reads xs:nonNegativeInteger pool_col_gbp_p_reads - 缓冲池按列组织 GBP 物理读取次数
pool_col_l_reads xs:nonNegativeInteger pool_col_l_reads - 缓冲池按列组织逻辑读取次数
pool_col_lbp_pages_found xs:nonNegativeInteger pool_col_lbp_pages_found - 发现的缓冲池中按列组织的 LBP 页面数
pool_col_p_reads xs:nonNegativeInteger pool_col_p_reads - 缓冲池按列组织物理读取次数
pool_col_writes xs:nonNegativeInteger pool_col_writes - 缓冲池按列组织写入次数
pool_data_gbp_indep_pages_found_in_lbp xs:nonNegativeInteger pool_data_gbp_indep_pages_found_in_lbp -“本地缓冲池中发现的独立于组缓冲池的数据页数”监视元素
pool_data_l_reads xs:nonNegativeInteger pool_data_l_reads - 缓冲池数据逻辑读取数
pool_data_p_reads xs:nonNegativeInteger pool_data_p_reads - 缓冲池数据物理读取数
pool_data_writes xs:nonNegativeInteger pool_data_writes - 缓冲池数据写次数
pool_failed_async_col_reqs xs:nonNegativeInteger pool_failed_async_col_reqs - 失败的按列组织预取请求数
pool_failed_async_data_reqs xs:nonNegativeInteger pool_failed_async_data_reqs - 失败数据预取请求数
pool_failed_async_index_reqs xs:nonNegativeInteger pool_failed_async_index_reqs - 失败的索引预取请求数
pool_failed_async_temp_col_reqs xs:nonNegativeInteger pool_failed_async_temp_col_reqs - 失败的按列组织临时预取请求数
pool_failed_async_temp_data_reqs xs:nonNegativeInteger pool_failed_async_temp_data_reqs - 失败的临时表空间数据预取请求数
pool_failed_async_temp_index_reqs xs:nonNegativeInteger pool_failed_async_temp_index_reqs - 失败的临时表空间索引预取请求数
pool_failed_async_temp_xda_reqs xs:nonNegativeInteger pool_failed_async_temp_xda_reqs - 失败的临时表空间 XDA 预取请求数
pool_failed_async_other_reqs xs:nonNegativeInteger pool_failed_async_other_reqs - 失败的非预取请求数
pool_failed_async_xda_reqs xs:nonNegativeInteger pool_failed_async_xda_reqs - 失败的 XDA 预取请求数
pool_index_gbp_indep_pages_found_in_lbp xs:nonNegativeInteger pool_index_gbp_indep_pages_found_in_lbp -“本地缓冲池中发现的独立于组缓冲池的索引页数”监视元素
pool_index_l_reads xs:nonNegativeInteger pool_index_l_reads - 缓冲池索引逻辑读取数
pool_index_p_reads xs:nonNegativeInteger pool_index_p_reads - 缓冲池索引物理读取数
pool_index_writes xs:nonNegativeInteger pool_index_writes - 缓冲池索引写次数
pool_queued_async_col_reqs xs:nonNegativeInteger pool_queued_async_col_reqs - 按列组织预取请求数
pool_queued_async_data_pages xs:nonNegativeInteger pool_queued_async_data_pages - 预取请求的数据页数
pool_queued_async_data_reqs xs:nonNegativeInteger pool_queued_async_data_reqs - 数据预取请求数
pool_queued_async_index_reqs xs:nonNegativeInteger pool_queued_async_index_reqs - 索引预取请求数
pool_queued_async_index_pages xs:nonNegativeInteger pool_queued_async_index_pages - 预取请求的索引页数
pool_queued_async_col_pages xs:nonNegativeInteger pool_queued_async_col_pages - 按列组织页面预取请求数
pool_queued_async_temp_col_pages xs:nonNegativeInteger pool_queued_async_temp_col_pages - 按列组织的页面临时预取请求数
pool_queued_async_temp_col_reqs xs:nonNegativeInteger pool_queued_async_temp_col_reqs - 按列组织临时预取请求数
pool_queued_async_temp_data_pages xs:nonNegativeInteger pool_queued_async_temp_data_pages - 预取请求的临时表空间数据页数
pool_queued_async_temp_data_reqs xs:nonNegativeInteger pool_queued_async_temp_data_reqs - 临时表空间数据预取请求数
pool_queued_async_temp_index_pages xs:nonNegativeInteger pool_queued_async_temp_index_pages - 预取请求的临时表空间索引页数
pool_queued_async_temp_index_reqs xs:nonNegativeInteger pool_queued_async_temp_index_reqs - 临时表空间索引预取请求数
pool_queued_async_temp_xda_pages xs:nonNegativeInteger pool_queued_async_temp_xda_pages - 预取请求的临时表空间 XDA 数据页数
pool_queued_async_temp_xda_reqs xs:nonNegativeInteger pool_queued_async_temp_xda_reqs - 临时表空间 XDA 数据预取请求数
pool_queued_async_other_reqs xs:nonNegativeInteger pool_queued_async_other_reqs-非预取请求数
pool_queued_async_xda_reqs xs:nonNegativeInteger pool_queued_async_xda_reqs - XDA 预取请求数
pool_read_time xs:nonNegativeInteger pool_read_time - 缓冲池物理读总时间
pool_temp_col_l_reads xs:nonNegativeInteger pool_temp_col_l_reads - 缓冲池按列组织临时逻辑读取次数
pool_temp_col_p_reads xs:nonNegativeInteger pool_temp_col_p_reads - 缓冲池按列组织临时物理读取次数
pool_temp_data_l_reads xs:nonNegativeInteger pool_temp_data_l_reads - 缓冲池临时数据逻辑读取数
pool_temp_data_p_reads xs:nonNegativeInteger pool_temp_data_p_reads - 缓冲池临时数据物理读取数
pool_temp_index_l_reads xs:nonNegativeInteger pool_temp_index_l_reads - 缓冲池临时索引逻辑读取数
pool_temp_index_p_reads xs:nonNegativeInteger pool_temp_index_p_reads - 缓冲池临时索引物理读取数
pool_temp_xda_l_reads xs:nonNegativeInteger pool_temp_xda_l_reads - 缓冲池临时 XDA 数据逻辑读取数
pool_temp_xda_p_reads xs:nonNegativeInteger pool_temp_xda_p_reads - 缓冲池临时 XDA 数据物理读取数
pool_write_time xs:nonNegativeInteger pool_write_time - 缓冲池物理写总时间
pool_xda_gbp_indep_pages_found_in_lbp xs:nonNegativeInteger pool_xda_gbp_indep_pages_found_in_lbp -“本地缓冲池中发现的独立于组缓冲池的 XDA 页数”监视元素
pool_xda_gbp_invalid_pages xs:nonNegativeInteger pool_xda_gbp_invalid_pages - 组缓冲池无效 XDA 数据页数
pool_xda_gbp_l_reads xs:nonNegativeInteger pool_xda_gbp_l_reads - 组缓冲池 XDA 数据逻辑读取请求数
pool_xda_gbp_p_reads xs:nonNegativeInteger pool_xda_gbp_p_reads - 组缓冲池 XDA 数据物理读取请求数
pool_xda_l_reads xs:nonNegativeInteger pool_xda_l_reads - 缓冲池 XDA 数据逻辑读取数
pool_xda_lbp_pages_found xs:nonNegativeInteger pool_xda_lbp_pages_found - 发现的本地缓冲池 XDA 数据页数
pool_xda_p_reads xs:nonNegativeInteger pool_xda_p_reads - 缓冲池 XDA 数据物理读取数
pool_xda_writes xs:nonNegativeInteger pool_xda_writes - 缓冲池 XDA 数据写次数
post_shrthreshold_hash_joins xs:long post_shrthreshold_hash_joins - 阈值后散列连接数监视元素
post_shrthreshold_sorts xs:nonNegativeInteger post_shrthreshold_sorts - 后共享阈值排序数
post_threshold_col_vector_consumers xs:long post_threshold_col_vector_services-事后阈值 columnar_vector 使用者
post_threshold_hash_grpbys xs:long post_threshold_hash_grpbys - 散列 GROUP BY 阈值
post_threshold_hash_joins xs:long post_threshold_hash_joins - 散列连接阈值监视元素
post_threshold_olap_funcs xs:long post_threshold_olap_funcs -“OLAP 函数阈值”监视元素
post_threshold_peas xs:long post_threshold_peas - 部分提前聚集阈值
post_threshold_peds xs:long post_threshold_peds - 部分提前相异数阈值
post_threshold_sorts xs:nonNegativeInteger post_threshold_sorts - 后阈值排序数
prefetch_wait_time xs:nonNegativeInteger prefetch_wait_time - 等待预取的时间
prefetch_waits xs:nonNegativeInteger prefetch_waits - 预取程序等待计数
prev_uow_stop_time xs:dateTime prev_uow_stop_time - 上一个工作单元完成时间戳记监视元素
reusability_status_reason xs: string (255) reusability_status_reason -“可复用性状态原因”监视元素
rows_deleted xs:long rows_deleted -“删除行数”监视元素
rows_inserted xs:long rows_inserted -“插入行数”监视元素
rows_modified xs:nonNegativeInteger rows_modified - 修改的行数
rows_read xs:nonNegativeInteger rows_read - 读取行数
rows_returned xs:nonNegativeInteger rows_returned - 返回的行数
rows_updated xs:long rows_updated -“更新行数”监视元素
rqsts_completed_total xs:nonNegativeInteger rqsts_completed_total - 完成请求总数
select_sql_stmts xs:long select_sql_stmts -“执行的 Select SQL 语句数”监视元素
session_auth_id xs:string session_auth_id - 会话授权标识
sort_heap_allocated xs:long sort_heap_allocated - 分配的总排序堆
sort_overflows xs:nonNegativeInteger sort_overflows - 排序溢出数
sort_shrheap_allocated xs:long sort_shrheap_allocated - 当前分配的共享排序堆
spacemappage_reclaim_wait_time xs:long spacemappage_reclaim_wait_time - 空间映射页回收等待时间
spacemappage_reclaim_wait_time xs:long spacemappage_reclaim_wait_time - 空间映射页回收等待时间
sql_reqs_since_commit xs:long sql_reqs_since_commit -“上次落实后的 SQL 请求数”监视元素
static_sql_stmts xs:long static_sql_stmts -“尝试的静态 SQL 语句数”监视元素
system_auth_id xs:string system_auth_id - 系统授权标识
tcpip_recv_volume xs:nonNegativeInteger tcpip_recv_volume - TCP/IP 接收量
tcpip_recv_wait_time xs:nonNegativeInteger tcpip_recv_wait_time-TCP/IP 接收等待时间
tcpip_recvs_total xs:nonNegativeInteger tcpip_recvs_total-TCP/IP recvs total
tcpip_send_volume xs:nonNegativeInteger tcpip_send_volume - TCP/IP 发送量
tcpip_send_wait_time xs:nonNegativeInteger tcpip_send_wait_time - TCP/IP 发送等待时间
tcpip_sends_total xs:nonNegativeInteger tcpip_sends_total - TCP/IP 发送总次数
thresh_violations xs:nonNegativeInteger thresh_violations - 阈值违例次数
total_act_time xs:nonNegativeInteger total_act_time - 活动总时间
total_act_wait_time xs:nonNegativeInteger total_act_wait_time - 活动等待总时间
total_app_commits xs:nonNegativeInteger total_app_commits - 应用程序落实次数总计
total_app_rollbacks xs:nonNegativeInteger total_app_rollbacks - 应用程序回滚次数总计
total_app_rqst_time xs:nonNegativeInteger total_app_rqst_time - 应用程序请求总时间
total_app_section_executions xs:nonNegativeInteger total_app_section_间执行数-段执行总数
total_backup_proc_time xs:long total_backup_proc_time - 执行联机备份耗用的总无等待时间
total_backup_time xs:long total_backup_time-联机备份的总耗用时间
total_backups xs:long total_backups - 备份总数
total_col_executions xs:nonNegativeInteger total_col_executions - 按列组织的总计执行次数
total_col_proc_time xs:nonNegativeInteger total_col_proc_time - 按列组织的总计处理时间
total_col_synopsis_executions xs:nonNegativeInteger total_col_synopsis_executions -“列组织概要表执行总次数”监视元素
total_col_synopsis_proc_time xs:nonNegativeInteger total_col_synopsis_proc_time -“列组织概要表处理时间总计”监视元素
total_col_synopsis_time xs:nonNegativeInteger total_col_synopsis_time -“列组织概要表时间总计”监视元素
total_col_time xs:nonNegativeInteger total_col_time - 散列循环总数
total_col_vector_consumers xs:long total_col_vector_使用者-columnar_vector 使用者总数
total_commit_proc_time xs:nonNegativeInteger total_commit_proc_time - 落实处理总时间
total_commit_time xs:nonNegativeInteger total_commit_time - 落实总时间
total_compilations xs:nonNegativeInteger total_compilations - 编译次数总计
total_compile_proc_time xs:nonNegativeInteger total_compile_proc_time - 编译处理总时间
total_compile_time xs:nonNegativeInteger total_compile_time - 编译总时间
total_connect_authentication_time xs:nonNegativeInteger total_connect_authentication_time -“连接或交换机用户认证请求总时间”监视元素
total_connect_authentication_proc_time xs:nonNegativeInteger total_connect_authentication_proc_time -“连接认证处理总时间”监视元素
total_connect_authentications xs:nonNegativeInteger total_connect_authentications - 执行的连接或交换机用户认证数
total_connect_request_proc_time xs:nonNegativeInteger total_connect_request_proc_time -“连接或交换机用户请求处理总时间”监视元素
total_connect_request_time xs:nonNegativeInteger total_connect_request_time -“连接或交换机用户请求总时间”监视元素
total_connect_requests xs:nonNegativeInteger total_connect_requests - 连接或交换机用户请求数
total_cpu_time xs:nonNegativeInteger total_cpu_time - CPU 总时间
total_disp_run_queue_time xs:long total_disp_run_queue_time - 分派器运行队列总时间
total_extended_latch_wait_time xs:nonNegativeInteger total_extended_latch_wait_time - 扩展锁存器等待总时间
total_extended_latch_waits xs:nonNegativeInteger total_extended_latch_waits - 扩展锁存器等待总计
total_hash_grpbys xs:long total_hash_grpbys - 散列 GROUP BY 操作总数
total_hash_joins xs:long total_hash_joins -“散列连接总数”监视元素
total_hash_loops xs:long total_hash_loops -“总散列循环数”监视元素
total_implicit_compilations xs:nonNegativeInteger total_implicit_compilations - 隐式编译总数
total_implicit_compile_proc_time xs:nonNegativeInteger total_implicit_compile_proc_time - 隐式编译处理总时间
total_implicit_compile_time xs:nonNegativeInteger total_implicit_compile_time - 隐式编译总时间
total_index_build_proc_time xs:long total_index_build_proc_time-由于创建索引,重新创建或重建索引而耗用的非等待总时间
total_index_build_time xs:long total_index_build_time-由于创建索引,重新创建或重建索引而花费的总时间
total_indexes_built xs:long total_indexes_built - 构建的索引总数
total_load_proc_time xs:nonNegativeInteger total_load_proc_time - 装入处理总时间
total_load_time xs:nonNegativeInteger total_load_time - 装入总时间
total_loads xs:nonNegativeInteger total_loads - 装入操作总数
total_olap_funcs xs:long total_olap_funcs -“OLAP 函数总数”监视元素
total_peas xs:long total_peas - 部分提前聚集总数
total_peds xs:long total_peds - 部分提前相异总数
total_reorg_proc_time xs:nonNegativeInteger total_reorg_proc_time - 重组处理总时间
total_reorg_time xs:nonNegativeInteger total_reorg_time - 重组总时间
total_reorgs xs:nonNegativeInteger total_reorgs - 重组操作总数
total_rollback_proc_time xs:nonNegativeInteger total_rollback_proc_time - 回滚处理总时间
total_rollback_time xs:nonNegativeInteger total_rollback_time - 回滚总时间
total_routine_invocations xs:nonNegativeInteger total_routine_invocations - 例程调用总计
total_routine_time xs:nonNegativeInteger total_routine_time - 例程总时间
total_routine_user_code_proc_time xs:nonNegativeInteger total_routine_user_code_proc_time - 例程用户代码处理总时间
total_routine_user_code_time xs:nonNegativeInteger total_routine_user_code_time - 例程用户代码总时间
total_rqst_time xs:nonNegativeInteger total_rqst_time - 请求总时间
total_runstats xs:nonNegativeInteger total_runstats - 运行时统计信息总计
total_runstats_proc_time xs:nonNegativeInteger total_runstats_proc_time - 运行时统计信息处理总时间
total_runstats_time xs:nonNegativeInteger total_runstats_time-运行时统计信息总计
total_section_proc_time xs:nonNegativeInteger total_section_proc_time - 部分处理总时间
total_section_sort_proc_time xs:nonNegativeInteger total_section_sort_proc_time - 节排序处理总时间
total_section_sort_time xs:nonNegativeInteger total_section_sort_time - 节排序总时间
total_section_sorts xs:nonNegativeInteger total_section_sorts - 节排序总次数
total_section_time xs:nonNegativeInteger total_section_time - 部分总时间
total_sorts xs:nonNegativeInteger total_sorts - 排序总数
total_stats_fabrication_proc_time xs:nonNegativeInteger total_stats_fabrication_proc_time - 统计信息生成处理总时间
total_stats_fabrication_time xs:nonNegativeInteger total_stats_fabrication_time - 统计信息生成总时间
total_stats_fabrications xs:nonNegativeInteger total_stats_fabrications - 统计信息生成总计
total_sync_runstats xs:nonNegativeInteger total_sync_runstats - 同步 RUNSTATS 活动总数
total_sync_runstats_proc_time xs:nonNegativeInteger total_sync_runstats_proc_time - 同步 RUNSTATS 处理总时间
total_sync_runstats_time xs:nonNegativeInteger total_sync_runstats_time - 同步 RUNSTATS 总时间
total_wait_time xs:nonNegativeInteger total_wait_time - 等待总时间
tq_sort_heap_rejections xs:long tq_sort_heap_rejections - 表队列排序堆拒绝数
tq_sort_heap_requests xs:long tq_sort_heap_requests - 表队列排序堆请求数
tq_tot_send_spills xs:nonNegativeInteger tq_tot_send_spills - 溢出表队列缓冲区总数
uid_sql_stmts xs:long uid_sql_stmts-"执行的更新/插入/删除 SQL 语句数" 监视元素
uow_client_idle_wait_time xs:long uow_client_idle_wait_time - 工作单元内客户机空闲时间
uow_comp_status xs:string uow_comp_status -“工作单元完成状态”监视元素
uow_start_time xs:dateTime uow_start_time -“工作单元开始时间戳记”监视元素
uow_stop_time xs:dateTime uow_stop_time -“工作单元停止时间戳记”监视元素
wlm_queue_assignments_total xs:nonNegativeInteger wlm_queue_assignments_total - 工作负载管理器队列分配总次数
wlm_queue_time_total xs:nonNegativeInteger wlm_queue_time_total - 工作负载管理器队列总时间
workload_occurrence_state xs:string workload_occurrence_state -“工作负载实例状态”监视元素
xquery_stmts xs:long xquery_stmts -“尝试的 XQuery 语句数”监视元素

使用说明

MON_GET_CONNECTION_DETAILS 表函数返回的指标表示连接提交的请求的所有指标的累积。 此函数类似于 MON_GET_CONNECTION 表函数:
  • MON_GET_CONNECTION 表函数以基于列的格式返回最常用的指标,并且是检索指标的最高效性能方法。
  • MON_GET_CONNECTION_DETAILS 表函数以 XML 文档格式返回整个可用指标集,这为格式化输出提供了最大的灵活性。 XML 解析器可以直接解析基于 XML 的输出,也可以通过 XMLTABLE 函数将该输出转换为关系格式(请参阅示例)。

度量值在工作单元边界上汇总,并在执行请求期间定期汇总。 因此,此表函数报告的值反映最新汇总时系统的当前状态。 指标值严格递增。 要确定时间间隔内给定度量的值,请使用 MON_GET_CONNECTION_DETAILS 表函数在时间间隔开始和结束时查询度量,并计算差异。

请求指标是通过服务超类上的 COLLECT REQUEST METRICS 子句和数据库级别的 mon_req_metrics 数据库配置参数来控制的。 仅当请求由服务子类(其父服务超类已启用请求指标值)中的代理程序处理,或者对整个数据库启用请求指标收集时,才会为请求收集指标。 缺省情况下,将在数据库级别启用请求度量。 如果在数据库级别禁用了请求度量值,并且对于服务超类,那么针对映射到该服务超类的每个连接报告的度量值将停止增加 (如果在数据库激活时禁用了请求度量值,那么保留为 0)。

提示: 由于连接可以在其生存期内映射到多个服务超类,因此如果在数据库级别禁用了收集,那么通过 MON_GET_CONNECTION_DETAILS 表函数报告的指标可能表示通过该连接提交的所有请求的指标子集。 如果对连接映射到的某些超类禁用了度量值收集,那么可能会发生此情况。

MON_GET_CONNECTION_DETAILS 表函数针对每个连接和每个成员返回一行数据。 不会跨成员 (针对服务类或更多服务类) 执行聚集。 但是,可以通过 SQL 查询来实现聚集。

在 DETAILS 列中返回的 XML 文档的模式在文件 sqllib/misc/DB2MonRoutines.xsd 中可用。 可以在 sqllib/misc/DB2MonCommon.xsd 文件中找到更多详细信息。

示例

显示将最大数据量返回给客户机的连接,按返回的行排序。

SELECT detmetrics.application_handle, 
       detmetrics.rows_returned, 
       detmetrics.tcpip_send_volume
FROM TABLE(MON_GET_CONNECTION_DETAILS(CAST(NULL as bigint), -2)) 
AS CONNMETRICS,
XMLTABLE (XMLNAMESPACES( DEFAULT 'http://www.ibm.com/xmlns/prod/db2/mon'),
       '$detmetric/db2_connection' PASSING XMLPARSE(DOCUMENT CONNMETRICS.DETAILS) 
       as "detmetric"
COLUMNS "APPLICATION_HANDLE" INTEGER PATH 'application_handle',
       "ROWS_RETURNED" BIGINT PATH 'system_metrics/rows_returned', 
       "TCPIP_SEND_VOLUME" BIGINT PATH 'system_metrics/tcpip_send_volume'
       ) AS DETMETRICS
ORDER BY rows_returned DESC

下列是从此查询输出的示例。

APPLICATION_HANDLE ROWS_RETURNED        TCPIP_SEND_VOLUME   
------------------ -------------------- --------------------
                21                    4                    0

  1 record(s) selected.