DB2表监控
查看DB2快照表函数:
select funcname from syscat.functions where funcschema='SYSPROC' and funcname like 'SNAPSHOT_%' with ur;
1、捕获数据库 Sample 中表信息的快照。
select * from table(SNAPSHOT_TABLE('sample',-1)) as T
select snapshot_timestamp, table_name, rows_written, rows_read from table(SNAPSHOT_TABLE('sample',-1)) as T
2、数据库连接监控
SELECT * FROM TABLE( SNAPSHOT_DBM( -1 )) AS T
SELECT local_cons,rem_cons_in FROM TABLE( SNAPSHOT_DBM( -1 )) AS T
3、连接应用程序信息
select * from table(SNAPSHOT_APPL_INFO(null,-1)) AS A
select * from table(SNAPSHOT_APPL_INFO('sample',-1)) AS A
参考:http://www.ibm.com/developerworks/cn/data/library/techarticles/0305deroos/0305deroos.html