DB2数据库自带的一些工具输出的结果不美观,不能像Oracle AWR的一样可以生成HTML格式的文件。我通过简单的HTML语句与SQL语句结合起来,写了一个可以生成HTML格式的巡检脚本。
这是巡检输出的部分截图:
脚本执行方式:
db2 connect to DBNAME;db2 -txf db2_v10.5.sql -z output.html
db2_v10.5.sql脚本内容如下:
--db2 "create bufferpool buffer_16k pagesize 16384" --db2 "create system temporary tablespace tbs_16k pagesize 16384 bufferpool buffer_16k" --db2 -txf db2_v10.5.sql -z output.html -- SUPPORT FOR DB2 V10.5 select '<!DOCTYPE html>' from sysibm.SYSDUMMY1 with ur; select '<html>' from sysibm.SYSDUMMY1 with ur; select '<head>' from sysibm.SYSDUMMY1 with ur; select '<html lang="utf">' from sysibm.SYSDUMMY1 with ur; select '<meta charset="utf">' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="TOP"></a></summary>' from sysibm.SYSDUMMY1 with ur; select '<h1 align="center" style="font-size:100px">IBM DB2 DATABASE</h1>' from sysibm.SYSDUMMY1 with ur; select '<h1 align="center" style="font-size:50px">Author:gaoyu</h1>' from sysibm.SYSDUMMY1 with ur; select '<h1 align="center" style="font-size:50px">Last Update:2020-09-28</h1>' from sysibm.SYSDUMMY1 with ur; select '</head>' from sysibm.SYSDUMMY1 with ur; --CATALOG DOWN select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a style="font-size:30px">CATALOG</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- OS -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="sys_base">OS</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#env_sys_info">OS CONFIGURE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#sys_resource">OS RESOURCE</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DB BASE -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_base">DATABASE BASE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#env_inst_info">INSTANCE INFO</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#license">LICENSE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#feature">PRODUCT FEATURE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#dbsize">DATABASE SIZE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#db2_hadr">DB2 HADR</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#db2_dpf">DB2 DPF</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE MEMORY -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="memory">DATABASE MEMORY</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#db2_mem">DB2 MEMORY</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#inst_mem">INSTANCE MEMORY</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#database_mem">DATABASE MEMORY</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#sort_heap_mem">SORT HEAP MEMORY</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE LOCK -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_locks">DATABASE LOCK</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#locks_waiting">LOCK WAITING</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#dead_locks">DEAD LOCKS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#locks_escals">LOCKS ESCALS</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE PARAMETER -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_variables">DATABASE PARAMETER</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#reg_register">DB2 REGISTER</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#dbm_cfg">DBM CFG</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#db_cfg">DB CFG</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE STORAGE -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_storage">DATABASE STORAGE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#db_path">DATABASE PATH</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#sto_group">STORAGE GROUP</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#tbs_info">TABLESPACE INFO</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#tbs_container">TABLESPACE CONTAINER</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE HISTORY -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_history">DATABASE HISTORY</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#db_his_backup">BACKUP DATABASE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#tbs_his_add">CREATE TABLESPACE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_drop_tbs">DROP TABLESPACE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_alter_tbs">ALTER TABLESPACE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_drop_tab">DROP TABLE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_reorg_tab">REORG TABLE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_statis_tab">RUNSTAT TABLE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_rename_tab">RENAME TABLESPACE(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_load_copy">LOAD COPY(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_load">LOAD(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_quiesce">Quiesce(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_restore">Restore(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_rollforward">Rollforward(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_unload">Unload(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#his_archive_logs">Archive logs(HISTORY)</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE OBJECTS -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_objects">DATABASE OBJECTS</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_tables">TABLE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#product_tables">USER TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#new_create_tables">NEW CREATE TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#table_size">TABLE SIZE(PAGES)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#table_size_2">TABLE SIZE(ADMINTABINFO)</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#table_relation_size">TABLE RELATION SIZE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#tab_data_part">PARTION TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#load_pending">LOAD PENDING</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#invalid_table">INVALID TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#rows_writeen_tables">ROWS WRITEEN TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#rows_overflow_tables">ROWS OVERFLOW TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#page_reorgs_tables">NEED REORG TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#need_reorg">NEED REORG TABLES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#statis_time_null_table">STATIS TIME NULL</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#statis_time_30_table">STATIS TIME > 30 DAYS</li></a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_indexes">INDEX</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_indexes">USER INDEXES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#invalid_index">INVALID INDEXES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#statis_time_null_index">STATIS TIME NULL</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#statis_time_30_index">STATIS TIME > 30 DAYS</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_views">VIEW</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_views">USER VIEWS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#invalid_view">INVALID VIEWS</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_trigger">TRIGGER</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_trigger">USER TRIGGERS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#invalid_trigger">INVALID TRIGGERS</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_package">PACKAGE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_package">USER PACKAGES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#invalid_package">INVALID PACKAGES</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_routine">ROUTINE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_routine">USER ROUTINES</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#invalid_routine">INVALID ROUTINES</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_function">FUNCTION</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_function">USER FUNCTIONS</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up --down select '<details class="menu" open>' from sysibm.SYSDUMMY1 with ur; select '<summary><a href="#db_procedure">PROCEDURE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#user_procedure">USER PROCEDURE</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --up select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE HIT RATE -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_hit_rate">DATABASE HIT RATE</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#buffer_hit_rate">BUFFERPOOL HIT RATE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#buffer_read_time">BUFFERPOOL READ TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#buffer_write_time">BUFFERPOOL WRITE TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#catalog_cache_hit_rate">CATALOG CACHE HIT RATE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#package_hit_rate">PACKAGE HIT RATE</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- CONSUME RESOURCE OF SQL -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_sql">SQL STATIS</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#connect_application">APPLICATIONS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#total_transcations">NUMS OF TRANSCATIONS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#select_sql_stmts">SELECT SQL/STMT</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#insert_delete_update_sql">THE NUMS OF INSERT DELETE UPDATET/STMTS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#total_time_sql">TOP 30:TOTAL EXECUTE TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#avg_time_sql">TOP 30:AVG EXECUTE TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#num_executions">TOP 30:NUMBER EXECUTE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#total_user_cpu_sql">TOP 30:TOTAL USER CPU TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#avg_user_cpu_sql">TOP 30:AVG USER CPU TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#total_sys_cpu_sql">TOP 30:TOTAL SYS CPU TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#avg_sys_cpu_sql">TOP 30:AVG SYS CPU TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#stmt_sorts">TOP 30:TOTAL SORTS NUM</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#avg_stmt_sorts">TOP 30:AVG SORTS NUM</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#total_sort_time">TOP 30:TOTAL SORTS TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#avg_sort_time">TOP 30:AVG SORTS TIME</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#sort_overflows">TOP 30:SORT OVERFLOWS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#avg_sort_overflows">TOP 30:AVG SORT OVERFLOWS</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#sort_overflows_percent">SORT OVERFLOWS PERCENT</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE LOG -- -- -- ----------------------------------------------------------------------- select '<details class="menu" close>' from sysibm.SYSDUMMY1 with ur; select '<summary><a name="db_logs">DATABASE LOG</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<ul>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#online_log">ONLINE LOG</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#online_log_percent">ONLINE LOG USAGE</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#used_most_log">Generate logged SQL</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#long_time_log">HOLDING LONG TIME ACTIVE LOG</a></li>' from sysibm.SYSDUMMY1 with ur; select '<li><a href="#last_24_hours_log">ERROR LOG</a></li>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CATALOG UP select '</details>' from sysibm.SYSDUMMY1 with ur; select '</ul>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- OS -- -- -- ----------------------------------------------------------------------- --OS CONFIGURE select '<a name="env_sys_info"><li>OS CONFIGURE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select OS_NAME, OS_VERSION, OS_RELEASE, HOST_NAME, TOTAL_CPUS, CONFIGURED_CPUS, TOTAL_MEMORY, OS_FULL_VERSION, OS_KERNEL_VERSION, OS_ARCH_TYPE from SYSIBMADM.ENV_SYS_INFO with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>OS_NAME</td>', '<td>OS_VERSION</td>', '<td>OS_RELEASE</td>', '<td>HOST_NAME</td>', '<td>TOTAL_CPUS</td>', '<td>CONFIGURED_CPUS</td>', '<td>TOTAL_MEMORY</td>', '<td>OS_FULL_VERSION</td>', '<td>OS_KERNEL_VERSION</td>', '<td>OS_ARCH_TYPE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',OS_NAME,'</td>', '<td>',OS_VERSION,'</td>', '<td>',OS_RELEASE,'</td>', '<td>',HOST_NAME,'</td>', '<td>',TOTAL_CPUS,'</td>', '<td>',CONFIGURED_CPUS,'</td>', '<td>',TOTAL_MEMORY,'</td>', '<td>',OS_FULL_VERSION,'</td>', '<td>',OS_KERNEL_VERSION,'</td>', '<td>',OS_ARCH_TYPE,'</td>' ||'</tr>' from SYSIBMADM.ENV_SYS_INFO with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#sys_base">[sys_base]</a><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</a><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --OS RESOURCE select '<a name="sys_resource"><li>OS RESOURCE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NAME, VALUE, DATATYPE, UNIT, DBPARTITIONNUM from sysibmadm.ENV_SYS_RESOURCES with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NAME</td>', '<td>VALUE</td>', '<td>DATATYPE</td>', '<td>UNIT</td>', '<td>DBPARTITIONNUM</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NAME,'</td>', '<td>',VALUE,'</td>', '<td>',DATATYPE,'</td>', '<td>',UNIT,'</td>', '<td>',DBPARTITIONNUM,'</td>' ||'</tr>' from sysibmadm.ENV_SYS_RESOURCES with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#sys_base">[sys_base]</a><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</a><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE BASE -- -- -- ----------------------------------------------------------------------- --实例信息 select '<a name="env_inst_info"><li>INSTANCE INFO</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select INST_NAME, IS_INST_PARTITIONABLE, NUM_DBPARTITIONS, INST_PTR_SIZE, RELEASE_NUM, SERVICE_LEVEL, BLD_LEVEL, PTF, FIXPACK_NUM from SYSIBMADM.ENV_INST_INFO with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>INST_NAME</td>', '<td>IS_INST_PARTITIONABLE</td>', '<td>NUM_DBPARTITIONS</td>', '<td>INST_PTR_SIZE</td>', '<td>RELEASE_NUM</td>', '<td>SERVICE_LEVEL</td>', '<td>BLD_LEVEL</td>', '<td>PTF</td>', '<td>FIXPACK_NUM</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',INST_NAME,'</td>', '<td>',IS_INST_PARTITIONABLE,'</td>', '<td>',NUM_DBPARTITIONS,'</td>', '<td>',INST_PTR_SIZE,'</td>', '<td>',RELEASE_NUM,'</td>', '<td>',SERVICE_LEVEL,'</td>', '<td>',BLD_LEVEL,'</td>', '<td>',PTF,'</td>', '<td>',FIXPACK_NUM,'</td>' ||'</tr>' from SYSIBMADM.ENV_INST_INFO with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --LICENSE select '<a name="license"><li>LICENSE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select INSTALLED_PROD, INSTALLED_PROD_FULLNAME, LICENSE_INSTALLED, PROD_RELEASE, LICENSE_TYPE from sysibmadm.env_PROD_info with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>INSTALLED_PROD</td>', '<td>INSTALLED_PROD_FULLNAME</td>', '<td>LICENSE_INSTALLED</td>', '<td>PROD_RELEASE</td>', '<td>LICENSE_TYPE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',INSTALLED_PROD,'</td>', '<td>',INSTALLED_PROD_FULLNAME,'</td>', '<td>',LICENSE_INSTALLED,'</td>', '<td>',PROD_RELEASE,'</td>', '<td>',LICENSE_TYPE,'</td>' ||'</tr>' from sysibmadm.env_PROD_info with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --PRODUCT FEATURE select '<a name="feature"><li>PRODUCT FEATURE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select FEATURE_NAME, FEATURE_FULLNAME, LICENSE_INSTALLED, PRODUCT_NAME, FEATURE_USE_STATUS from sysibmadm.ENV_FEATURE_INFO with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>FEATURE_NAME</td>', '<td>FEATURE_FULLNAME</td>', '<td>LICENSE_INSTALLED</td>', '<td>PRODUCT_NAME</td>', '<td>FEATURE_USE_STATUS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',FEATURE_NAME,'</td>', '<td>',FEATURE_FULLNAME,'</td>', '<td>',LICENSE_INSTALLED,'</td>', '<td>',PRODUCT_NAME,'</td>', '<td>',FEATURE_USE_STATUS,'</td>' ||'</tr>' from sysibmadm.ENV_FEATURE_INFO with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DATABASE SIZE select '<a name="dbsize"><li>DATABASE SIZE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DB_SIZE_MB, DB_CAPACITY_MB from systools.STMG_DBSIZE_INFO with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> SNAPSHOT_TIMESTAMP </td>', '<td> DB_SIZE_MB </td>', '<td> DB_CAPACITY_MB </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>', SNAPSHOT_TIMESTAMP ,'</td>', '<td>', DB_SIZE/1024/1024 ,'</td>', '<td>', DB_CAPACITY/1024/1024 ,'</td>' ||'</tr>' from systools.STMG_DBSIZE_INFO with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --database size select '<a name="dbsize">DATABASE SIZE</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select sum(TBSP_USED_SIZE_KB)/1024, sum(TBSP_TOTAL_SIZE_KB)/1024 from sysibmadm.TBSP_UTILIZATION with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DB_SIZE_MB </td>', '<td> DB_CAPACITY_MB </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>', sum(TBSP_USED_SIZE_KB)/1024 ,'</td>', '<td>', sum(TBSP_TOTAL_SIZE_KB)/1024 ,'</td>' ||'</tr>' from sysibmadm.TBSP_UTILIZATION with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DB2 HADR select '<a name="db2_hadr"><li>DB2 HADR</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DB_NAME, HADR_ROLE, HADR_STATE, HADR_SYNCMODE, HADR_CONNECT_STATUS, HADR_CONNECT_TIME, HADR_HEARTBEAT, HADR_LOCAL_HOST, HADR_LOCAL_SERVICE, HADR_REMOTE_HOST, HADR_REMOTE_SERVICE, HADR_REMOTE_INSTANCE, HADR_TIMEOUT, HADR_PRIMARY_LOG_FILE, HADR_PRIMARY_LOG_PAGE, HADR_PRIMARY_LOG_LSN, HADR_STANDBY_LOG_FILE, HADR_STANDBY_LOG_PAGE, HADR_STANDBY_LOG_LSN, HADR_LOG_GAP, DBPARTITIONNUM from sysibmadm.snaphadr with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr><td>SNAPSHOT_TIMESTAMP</td>','<td style="background:white">',SNAPSHOT_TIMESTAMP,'</td></tr>', '<tr><td>DB_NAME</td>','<td style="background:white">',DB_NAME,'</td></tr>', '<tr><td>HADR_ROLE</td>','<td style="background:white">',HADR_ROLE,'</td></tr>', '<tr><td>HADR_STATE</td>','<td style="background:white">',HADR_STATE,'</td></tr>', '<tr><td>HADR_SYNCMODE</td>','<td style="background:white">',HADR_SYNCMODE,'</td></tr>', '<tr><td>HADR_CONNECT_STATUS</td>','<td style="background:white">',HADR_CONNECT_STATUS,'</td></tr>', '<tr><td>HADR_CONNECT_TIME</td>','<td style="background:white">',HADR_CONNECT_TIME,'</td></tr>', '<tr><td>HADR_HEARTBEAT</td>','<td style="background:white">',HADR_HEARTBEAT,'</td></tr>', '<tr><td>HADR_LOCAL_HOST</td>','<td style="background:white">',HADR_LOCAL_HOST,'</td></tr>', '<tr><td>HADR_LOCAL_SERVICE</td>','<td style="background:white">',HADR_LOCAL_SERVICE,'</td></tr>', '<tr><td>HADR_REMOTE_HOST</td>','<td style="background:white">',HADR_REMOTE_HOST,'</td></tr>', '<tr><td>HADR_REMOTE_SERVICE</td>','<td style="background:white">',HADR_REMOTE_SERVICE,'</td></tr>', '<tr><td>HADR_REMOTE_INSTANCE</td>','<td style="background:white">',HADR_REMOTE_INSTANCE,'</td></tr>', '<tr><td>HADR_TIMEOUT</td>','<td style="background:white">',HADR_TIMEOUT,'</td></tr>', '<tr><td>HADR_PRIMARY_LOG_FILE</td>','<td style="background:white">',HADR_PRIMARY_LOG_FILE,'</td></tr>', '<tr><td>HADR_PRIMARY_LOG_PAGE</td>','<td style="background:white">',HADR_PRIMARY_LOG_PAGE,'</td></tr>', '<tr><td>HADR_PRIMARY_LOG_LSN</td>','<td style="background:white">',HADR_PRIMARY_LOG_LSN,'</td></tr>', '<tr><td>HADR_STANDBY_LOG_FILE</td>','<td style="background:white">',HADR_STANDBY_LOG_FILE,'</td></tr>', '<tr><td>HADR_STANDBY_LOG_PAGE</td>','<td style="background:white">',HADR_STANDBY_LOG_PAGE,'</td></tr>', '<tr><td>HADR_STANDBY_LOG_LSN</td>','<td style="background:white">',HADR_STANDBY_LOG_LSN,'</td></tr>', '<tr><td>HADR_LOG_GAP</td>','<td style="background:white">',HADR_LOG_GAP,'</td></tr>', '<tr><td>DBPARTITIONNUM</td>','<td style="background:white">',DBPARTITIONNUM,'</td></tr>' from sysibmadm.snaphadr with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DATABASE DPF select '<a name="db2_dpf"><li>DB2 DPF</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT * FROM TABLE(DB_PARTITIONS()) AS T with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> PARTITION_NUMBER </td>', '<td> HOST_NAME </td>', '<td> PORT_NUMBER </td>', '<td> SWITCH_NAME </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>', PARTITION_NUMBER ,'</td>', '<td>', HOST_NAME ,'</td>', '<td>', PORT_NUMBER ,'</td>', '<td>', SWITCH_NAME ,'</td>' ||'</tr>' from TABLE(DB_PARTITIONS()) AS T with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_base">[db_base]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE MEMORY -- -- -- ----------------------------------------------------------------------- --DB2 MEMORY select '<a name="db2_mem"><li>DB2 MEMORY</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT * FROM TABLE (SYSPROC.ADMIN_GET_DBP_MEM_USAGE()) AS T with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>MAX_PARTITION_MEM_KB</td>', '<td>CURRENT_PARTITION_MEM_KB</td>', '<td>PEAK_PARTITION_MEM_KB</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',MAX_PARTITION_MEM/1024,'</td>', '<td>',CURRENT_PARTITION_MEM/1024,'</td>', '<td>',PEAK_PARTITION_MEM/1024,'</td>' ||'</tr>' from TABLE (SYSPROC.ADMIN_GET_DBP_MEM_USAGE()) AS T with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#memory">[memory]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --INSTANCE MEMORY select '<a name="inst_mem"><li>INSTANCE MEMORY</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT POOL_ID,POOL_CUR_SIZE,POOL_WATERMARK,POOL_CONFIG_SIZE,DBPARTITIONNUM,MEMBER FROM SYSIBMADM.SNAPDBM_MEMORY_POOL with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>POOL_ID</td>', '<td>POOL_CUR_SIZE</td>', '<td>POOL_WATERMARK_KB</td>', '<td>POOL_CONFIG_SIZE_KB</td>', '<td>DBPARTITIONNUM</td>', '<td>MEMBER</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',POOL_ID,'</td>', '<td>',POOL_CUR_SIZE,'</td>', '<td>',POOL_WATERMARK/1024,'</td>', '<td>',POOL_CONFIG_SIZE/1024,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',MEMBER,'</td>' ||'</tr>' from SYSIBMADM.SNAPDBM_MEMORY_POOL with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#memory">[memory]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DATABASE MEMORY select '<a name="database_mem"><li>DATABASE MEMORY</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DBPARTITIONNUM, pool_id, pool_cur_size, pool_watermark, pool_config_size, dec(double(pool_cur_size)/double(pool_config_size),6,2) as percent from SYSIBMADM.SNAPDB_MEMORY_POOL with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SNAPSHOT_TIMESTAMP</td>', '<td>DBPARTITIONNUM</td>', '<td>POOL_ID</td>', '<td>POOL_CUR_SIZE_KB</td>', '<td>POOL_WATERMARK_KB</td>', '<td>POOL_CONFIG_SIZE_KB</td>', '<td>PERCENT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SNAPSHOT_TIMESTAMP,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',pool_id,'</td>', '<td>',pool_cur_size/1024,'</td>', '<td>',pool_watermark/1024,'</td>', '<td>',pool_config_size/1024,'</td>', '<td>',dec(double(pool_cur_size)/double(pool_config_size),6,2),'</td>' ||'</tr>' from SYSIBMADM.SNAPDB_MEMORY_POOL with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#memory">[memory]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --SORT HEAP MEMORY select '<a name="sort_heap_mem"><li>SORT HEAP MEMORY</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SORT_HEAP_ALLOCATED,SORT_SHRHEAP_ALLOCATED,SORT_SHRHEAP_TOP FROM SYSIBMADM.SNAPDB with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SORT_HEAP_ALLOCATED</td>', '<td>SORT_SHRHEAP_ALLOCATED</td>', '<td>SORT_SHRHEAP_TOP</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SORT_HEAP_ALLOCATED,'</td>', '<td>',SORT_SHRHEAP_ALLOCATED,'</td>', '<td>',SORT_SHRHEAP_TOP,'</td>' ||'</tr>' from SYSIBMADM.SNAPDB with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#memory">[memory]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE LOCK -- -- -- ----------------------------------------------------------------------- --database locks select '<a name="locks_waiting"><li>LOCKS WAITING</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, LOCK_LIST_IN_USE, LOCK_WAIT_TIME, LOCK_WAITS, LOCKS_WAITING, LOCKS_HELD from sysibmadm.snapdb with ur </code><br>' from SYSIBM.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from SYSIBM.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM </td>', '<td>LOCK_LIST_IN_USE </td>', '<td>LOCK_WAIT_TIME </td>', '<td>LOCK_WAITS </td>', '<td>LOCKS_WAITING </td>', '<td>LOCKS_HELD </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',LOCK_LIST_IN_USE ,'</td>', '<td>',LOCK_WAIT_TIME ,'</td>', '<td>',LOCK_WAITS ,'</td>', '<td>',LOCKS_WAITING ,'</td>', '<td>',LOCKS_HELD ,'</td>' ||'</tr>' from sysibmadm.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_locks">[db_locks]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --dead_locks select '<a name="dead_locks"><li>DEAD LOCKS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, LOCK_LIST_IN_USE, DEADLOCKS from sysibmadm.snapdb with ur </code><br>' from SYSIBM.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from SYSIBM.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM </td>', '<td>LOCK_LIST_IN_USE </td>', '<td>DEADLOCKS </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',LOCK_LIST_IN_USE ,'</td>', '<td>',DEADLOCKS ,'</td>' ||'</tr>' from sysibmadm.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_locks">[db_locks]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --LOCK ESCALS select '<a name="locks_escals"><li>LOCKS ESCALS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, LOCK_LIST_IN_USE, LOCK_ESCALS from sysibmadm.snapdb with ur </code><br>' from SYSIBM.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from SYSIBM.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM </td>', '<td>LOCK_LIST_IN_USE </td>', '<td>LOCK_ESCALS </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',LOCK_LIST_IN_USE ,'</td>', '<td>',LOCK_ESCALS ,'</td>' ||'</tr>' from sysibmadm.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_locks">[db_locks]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE PARAMETER -- -- -- ----------------------------------------------------------------------- --DB2 REGISTER select '<a name="reg_register"><li>DB2 REGISTER</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, REG_VAR_NAME, REG_VAR_VALUE, IS_AGGREGATE, AGGREGATE_NAME, LEVEL from SYSIBMADM.REG_VARIABLES with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>REG_VAR_NAME</td>', '<td>REG_VAR_VALUE</td>', '<td>IS_AGGREGATE</td>', '<td>AGGREGATE_NAME</td>', '<td>LEVEL</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',REG_VAR_NAME,'</td>', '<td>',REG_VAR_VALUE,'</td>', '<td>',IS_AGGREGATE,'</td>', '<td>',AGGREGATE_NAME,'</td>', '<td>',LEVEL,'</td>' ||'</tr>' from SYSIBMADM.REG_VARIABLES with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_variables">[db_variables]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DBM CFG select '<a name="dbm_cfg"><li>DBM CFG</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NAME, VALUE, VALUE_FLAGS, DEFERRED_VALUE, DEFERRED_VALUE_FLAGS, DATATYPE from sysibmadm.dbmcfg with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NAME</td>', '<td>VALUE</td>', '<td>VALUE_FLAGS</td>', '<td>DEFERRED_VALUE</td>', '<td>DEFERRED_VALUE_FLAGS</td>', '<td>DATATYPE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NAME,'</td>', '<td>',VALUE,'</td>', '<td>',VALUE_FLAGS,'</td>', '<td>',DEFERRED_VALUE,'</td>', '<td>',DEFERRED_VALUE_FLAGS,'</td>', '<td>',DATATYPE,'</td>' ||'</tr>' from sysibmadm.dbmcfg with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_variables">[db_variables]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DB CFG select '<a name="db_cfg"><li>DB CFG</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NAME, VALUE, VALUE_FLAGS, DEFERRED_VALUE, DEFERRED_VALUE_FLAGS, DATATYPE, DBPARTITIONNUM from sysibmadm.dbcfg with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NAME</td>', '<td>VALUE</td>', '<td>VALUE_FLAGS</td>', '<td>DEFERRED_VALUE</td>', '<td>DEFERRED_VALUE_FLAGS</td>', '<td>DATATYPE</td>', '<td>DBPARTITIONNUM</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NAME,'</td>', '<td>',VALUE,'</td>', '<td>',VALUE_FLAGS,'</td>', '<td>',DEFERRED_VALUE,'</td>', '<td>',DEFERRED_VALUE_FLAGS,'</td>', '<td>',DATATYPE,'</td>', '<td>',DBPARTITIONNUM,'</td>' ||'</tr>' from sysibmadm.dbcfg with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_variables">[db_variables]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE STORAGE -- -- -- ----------------------------------------------------------------------- --DATABASE PATH select '<a name="db_path"><li>DATABASE PATH</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, DB_NAME, DB_STORAGE_PATH, DB_STORAGE_PATH_STATE, FS_TOTAL_SIZE/1024/1024, FS_USED_SIZE/1024/1024, STO_PATH_FREE_SIZE/1024/1024 from sysibmadm.SNAPSTORAGE_PATHS with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>DB_NAME</td>', '<td>DB_STORAGE_PATH</td>', '<td>DB_STORAGE_PATH_STATE</td>', '<td>FS_TOTAL_SIZE_MB</td>', '<td>FS_USED_SIZE_MB</td>', '<td>STO_PATH_FREE_SIZE_MB</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',DB_NAME,'</td>', '<td>',DB_STORAGE_PATH,'</td>', '<td>',DB_STORAGE_PATH_STATE,'</td>', '<td>',FS_TOTAL_SIZE/1024/1024,'</td>', '<td>',FS_USED_SIZE/1024/1024,'</td>', '<td>',STO_PATH_FREE_SIZE/1024/1024,'</td>' ||'</tr>' from sysibmadm.SNAPSTORAGE_PATHS with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_storage">[db_storage]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STORAGE GROUP select '<a name="sto_group"><li>STORAGE GROUP</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, STORAGE_GROUP_NAME, DB_STORAGE_PATH, DB_STORAGE_PATH_WITH_DPE, DB_STORAGE_PATH_STATE, FS_TOTAL_SIZE/1024/1024, FS_USED_SIZE/1024/1024, STO_PATH_FREE_SIZE/1024/1024 from TABLE(ADMIN_GET_STORAGE_PATHS('',-1)) with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>STORAGE_GROUP_NAME</td>', '<td>DB_STORAGE_PATH</td>', '<td>DB_STORAGE_PATH_WITH_DPE</td>', '<td>DB_STORAGE_PATH_STATE</td>', '<td>FS_TOTAL_SIZE_MB</td>', '<td>FS_USED_SIZE</td>', '<td>STO_PATH_FREE_SIZE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',STORAGE_GROUP_NAME,'</td>', '<td>',DB_STORAGE_PATH,'</td>', '<td>',DB_STORAGE_PATH_WITH_DPE,'</td>', '<td>',DB_STORAGE_PATH_STATE,'</td>', '<td>',FS_TOTAL_SIZE/1024/1024,'</td>', '<td>',FS_USED_SIZE/1024/1024,'</td>', '<td>',STO_PATH_FREE_SIZE/1024/1024,'</td>' ||'</tr>' from TABLE(ADMIN_GET_STORAGE_PATHS('',-1)) with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_storage">[db_storage]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TABLESPACE INFO select '<a name="tbs_info"><li>TABLESPACE INFO</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, tbsp_name, TBSP_PAGE_SIZE, TBSP_TYPE, TBSP_USING_AUTO_STORAGE, TBSP_AUTO_RESIZE_ENABLED, TBSP_CONTENT_TYPE, TBSP_STATE, TBSP_TOTAL_SIZE_KB/1024, TBSP_USABLE_SIZE_KB/1024, TBSP_USABLE_SIZE_KB/1024, TBSP_USED_SIZE_KB/1024, TBSP_FREE_SIZE_KB/1024, TBSP_UTILIZATION_PERCENT from sysibmadm.tbsp_utilization with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>tbsp_name</td>', '<td>TBSP_PAGE_SIZE</td>', '<td>TBSP_TYPE</td>', '<td>AS</td>', '<td>AR</td>', '<td>TBSP_CONTENT_TYPE</td>', '<td>TBSP_STATE</td>', '<td>TBSP_TOTAL_SIZE_MB</td>', '<td>TBSP_USABLE_SIZE_MB</td>', '<td>TBSP_USABLE_SIZE_MB</td>', '<td>TBSP_USED_SIZE_MB</td>', '<td>TBSP_FREE_SIZE_MB</td>', '<td>PERCENT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',tbsp_name,'</td>', '<td>',TBSP_PAGE_SIZE,'</td>', '<td>',TBSP_TYPE,'</td>', '<td>',TBSP_USING_AUTO_STORAGE,'</td>', '<td>',TBSP_AUTO_RESIZE_ENABLED,'</td>', '<td>',TBSP_CONTENT_TYPE,'</td>', '<td>',TBSP_STATE,'</td>', '<td>',TBSP_TOTAL_SIZE_KB/1024,'</td>', '<td>',TBSP_USABLE_SIZE_KB/1024,'</td>', '<td>',TBSP_USABLE_SIZE_KB/1024,'</td>', '<td>',TBSP_USED_SIZE_KB/1024,'</td>', '<td>',TBSP_FREE_SIZE_KB/1024,'</td>', '<td>',TBSP_UTILIZATION_PERCENT,'</td>' ||'</tr>' from sysibmadm.tbsp_utilization with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_storage">[db_storage]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TABLESPACE CONTAINER select '<a name="tbs_container"><li>TABLESPACE CONTAINER</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select a.DBPARTITIONNUM, b.TBSP_NAME, a.TBSP_ID, a.TBSP_ID, a.CONTAINER_TYPE, a.TOTAL_PAGES*b.TBSP_PAGE_SIZE/1024/1024, a.USABLE_PAGES*b.TBSP_PAGE_SIZE/1024/1024, FS_TOTAL_SIZE_KB/1024, a.FS_USED_SIZE_KB/1024, a.CONTAINER_NAME from sysibmadm.CONTAINER_UTILIZATION a,sysibmadm.tbsp_utilization b where a.TBSP_ID=b.TBSP_ID with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>TBSP_NAME</td>', '<td>TBSP_ID</td>', '<td>CONTAINER_ID</td>', '<td>CONTAINER_TYPE</td>', '<td>TBS_TOTAL_MB</td>', '<td>TBS_USABLE_MB</td>', '<td>FS_TOTAL_SIZE_MB</td>', '<td>FS_USED_SIZE_MB</td>', '<td>CONTAINER_NAME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',a.DBPARTITIONNUM,'</td>', '<td>',b.TBSP_NAME,'</td>', '<td>',a.TBSP_ID,'</td>', '<td>',a.TBSP_ID,'</td>', '<td>',a.CONTAINER_TYPE,'</td>', '<td>',a.TOTAL_PAGES*b.TBSP_PAGE_SIZE/1024/1024,'</td>', '<td>',a.USABLE_PAGES*b.TBSP_PAGE_SIZE/1024/1024,'</td>', '<td>',FS_TOTAL_SIZE_KB/1024,'</td>', '<td>',a.FS_USED_SIZE_KB/1024,'</td>', '<td>',a.CONTAINER_NAME,'</td>' ||'</tr>' from sysibmadm.CONTAINER_UTILIZATION a,sysibmadm.tbsp_utilization b where a.TBSP_ID=b.TBSP_ID with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_storage">[db_storage]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE HISTORY -- -- -- ----------------------------------------------------------------------- --DATABASE BACKUP(HISTORY) select '<a name="db_his_backup"><li>LAST 20:BACKUP DATABASE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, START_TIME, END_TIME, FIRSTLOG, LASTLOG, BACKUP_ID, COMMENT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''B'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> START_TIME </td>', '<td> END_TIME </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> COMMENT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',START_TIME ,'</td>', '<td>',END_TIME ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',COMMENT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='B' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</a></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>D = delta offline</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code>E = delta online</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code>F = offline</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code>I = incremental offline</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code>N = online</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code>O = incremental online</code></br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</a></br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</a></br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CREATE TABLESPACE(HISTORY) select '<a name="tbs_his_add"><li>LAST 20:ADD TABLESPACE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, START_TIME, END_TIME, NUM_LOG_ELEMS, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OBJECTTYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''A'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> START_TIME </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OBJECTTYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',START_TIME ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='A' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DROP TABLESPACE(HISTORY) select '<a name="his_drop_tbs"><li>LAST 20:DROP TABLESPACE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''O'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='O' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --ALTER TABLESPACE(HISTORY) select '<a name="his_alter_tbs"><li>LAST 20:ALTER TABLESPACE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''T'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='T' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>C = add containers</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>R = rebalance</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --DROP TABLE(HISTORY) select '<a name="his_drop_tab"><li>LAST 20:DROP TABLE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''D'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='D' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --REORG TABLE(HISTORY) select '<a name="his_reorg_tab"><li>LAST 50:REORG TABLE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, START_TIME, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, TABSCHEMA, TABNAME, COMMENT, OPERATION, OPERATIONTYPE, OBJECTTYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''G'' order by START_TIME desc fetch first 50 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> START_TIME </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',START_TIME ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='G' order by START_TIME desc fetch first 50 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>F = offline</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>N = online</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --RUNSTAT TABLE(HISTORY) select '<a name="his_statis_tab"><li>TOP 30:RUNSTAT TABLE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, stats_time from syscat.tables where tabschema not like ''SYS%'' order by stats_time desc fetch first 30 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>STATS_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',stats_time,'</td>' ||'</tr>' from syscat.tables where tabschema not like 'SYS%' order by stats_time desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --RENAME TABLESPACE(HISTORY) select '<a name="his_rename_tab"><li>LAST 20:RENAME TABLE(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''N'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='N' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --LOAD COPY(HISTORY) select '<a name="his_load_copy"><li>LAST 20:LOAD COPY(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''C'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='C' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --LOAD(HISTORY) select '<a name="his_load"><li>LAST 30:LOAD(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''L'' order by START_TIME desc fetch first 30 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='L' order by START_TIME desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>I = insert</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>R = replace</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --Quiesce(HISTORY) select '<a name="his_quiesce"><li>LAST 20:Quiesce(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''Q'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',EID,'</td>', '<td>',START_TIME,'</td>', '<td>',SEQNUM,'</td>', '<td>',END_TIME,'</td>', '<td>',NUM_LOG_ELEMS,'</td>', '<td>',FIRSTLOG,'</td>', '<td>',LASTLOG,'</td>', '<td>',BACKUP_ID,'</td>', '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>', '<td>',COMMENT,'</td>', '<td>',CMD_TEXT,'</td>', '<td>',NUM_TBSPS,'</td>', '<td>',TBSPNAMES,'</td>', '<td>',OPERATION,'</td>', '<td>',OPERATIONTYPE,'</td>', '<td>',OBJECTTYPE,'</td>', '<td>',LOCATION,'</td>', '<td>',DEVICETYPE,'</td>', '<td>',SQLCODE,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='Q' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>S = quiesce share</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>U = quiesce update</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>X = quiesce exclusive</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>Z = quiesce reset</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --Restore(HISTORY) select '<a name="his_restore"><li>LAST 20:Restore(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''R'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',EID,'</td>', '<td>',START_TIME,'</td>', '<td>',SEQNUM,'</td>', '<td>',END_TIME,'</td>', '<td>',NUM_LOG_ELEMS,'</td>', '<td>',FIRSTLOG,'</td>', '<td>',LASTLOG,'</td>', '<td>',BACKUP_ID,'</td>', '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>', '<td>',COMMENT,'</td>', '<td>',CMD_TEXT,'</td>', '<td>',NUM_TBSPS,'</td>', '<td>',TBSPNAMES,'</td>', '<td>',OPERATION,'</td>', '<td>',OPERATIONTYPE,'</td>', '<td>',OBJECTTYPE,'</td>', '<td>',LOCATION,'</td>', '<td>',DEVICETYPE,'</td>', '<td>',SQLCODE,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='R' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>F = offline</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>I = incremental offline</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>N = online</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>O = incremental online</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>R = rebuild</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --Rollforward(HISTORY) select '<a name="his_rollforward"><li>LAST 20:Rollforward(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''F'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM ,'</td>', '<td>',EID ,'</td>', '<td>',START_TIME ,'</td>', '<td>',SEQNUM ,'</td>', '<td>',END_TIME ,'</td>', '<td>',NUM_LOG_ELEMS ,'</td>', '<td>',FIRSTLOG ,'</td>', '<td>',LASTLOG ,'</td>', '<td>',BACKUP_ID ,'</td>', '<td>',TABSCHEMA ,'</td>', '<td>',TABNAME ,'</td>', '<td>',COMMENT ,'</td>', '<td>',CMD_TEXT ,'</td>', '<td>',NUM_TBSPS ,'</td>', '<td>',TBSPNAMES ,'</td>', '<td>',OPERATION ,'</td>', '<td>',OPERATIONTYPE ,'</td>', '<td>',OBJECTTYPE ,'</td>', '<td>',LOCATION ,'</td>', '<td>',DEVICETYPE ,'</td>', '<td>',SQLCODE ,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='F' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>E = end of logs</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>P = point in time</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --Unload(HISTORY) select '<a name="his_unload"><li>LAST 20:Unload(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, SEQNUM, END_TIME, NUM_LOG_ELEMS, FIRSTLOG, LASTLOG, BACKUP_ID, TABSCHEMA, TABNAME, COMMENT, CMD_TEXT, NUM_TBSPS, TBSPNAMES, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE, SQLCODE from SYSIBMADM.DB_HISTORY where OPERATION=''U'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> SEQNUM </td>', '<td> END_TIME </td>', '<td> NUM_LOG_ELEMS </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> TABSCHEMA </td>', '<td> TABNAME </td>', '<td> COMMENT </td>', '<td> CMD_TEXT </td>', '<td> NUM_TBSPS </td>', '<td> TBSPNAMES </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>', '<td> SQLCODE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',EID,'</td>', '<td>',START_TIME,'</td>', '<td>',SEQNUM,'</td>', '<td>',END_TIME,'</td>', '<td>',NUM_LOG_ELEMS,'</td>', '<td>',FIRSTLOG,'</td>', '<td>',LASTLOG,'</td>', '<td>',BACKUP_ID,'</td>', '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>', '<td>',COMMENT,'</td>', '<td>',CMD_TEXT,'</td>', '<td>',NUM_TBSPS,'</td>', '<td>',TBSPNAMES,'</td>', '<td>',OPERATION,'</td>', '<td>',OPERATIONTYPE,'</td>', '<td>',OBJECTTYPE,'</td>', '<td>',LOCATION,'</td>', '<td>',DEVICETYPE,'</td>', '<td>',SQLCODE,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='U' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; ---Archive logs(HISTORY) select '<a name="his_archive_logs"><li>LAST 20:Archive logs(HISTORY)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, EID, START_TIME, END_TIME, FIRSTLOG, LASTLOG, BACKUP_ID, COMMENT, OPERATION, OPERATIONTYPE, OBJECTTYPE, LOCATION, DEVICETYPE from SYSIBMADM.DB_HISTORY where OPERATION=''X'' order by START_TIME desc fetch first 20 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td> DBPARTITIONNUM </td>', '<td> EID </td>', '<td> START_TIME </td>', '<td> END_TIME </td>', '<td> FIRSTLOG </td>', '<td> LASTLOG </td>', '<td> BACKUP_ID </td>', '<td> COMMENT </td>', '<td> OPERATION </td>', '<td> OPERATIONTYPE </td>', '<td> OBJECTTYPE </td>', '<td> LOCATION </td>', '<td> DEVICETYPE </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',EID,'</td>', '<td>',START_TIME,'</td>', '<td>',END_TIME,'</td>', '<td>',FIRSTLOG,'</td>', '<td>',LASTLOG,'</td>', '<td>',BACKUP_ID,'</td>', '<td>',COMMENT,'</td>', '<td>',OPERATION,'</td>', '<td>',OPERATIONTYPE,'</td>', '<td>',OBJECTTYPE,'</td>', '<td>',LOCATION,'</td>', '<td>',DEVICETYPE,'</td>' ||'</tr>' from SYSIBMADM.DB_HISTORY where OPERATION='X' order by START_TIME desc fetch first 20 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OPERATIONTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>F = fail archive path</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>M = mirror log path</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>N = forced truncation via ARCHIVE LOG command</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>P = primary log path</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>1 = first log archive method</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>2 = second log archive method</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>OBJECTTYPE:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>F = offline</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>I = incremental offline</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>N = online</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>O = incremental online,</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>R = rebuild</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_history">[db_history]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE OBJECT -- -- -- ----------------------------------------------------------------------- --PRODUCT TABLES select '<a name="product_tables"><li>TOP 30:USER TABLES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname from syscat.tables where tabschema not like ''SYS%'' fetch first 30 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>' ||'</tr>' from syscat.tables where tabschema not like 'SYS%' fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS THE NUMBER OF USER TABLES select '<a>COUNT USER TABLE</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select count(TABNAME) from syscat.tables where tabschema not like ''SYS%'' with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_TABLES</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',count(TABNAME),'</td>' ||'</tr>' from syscat.tables where tabschema not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --THE NEWEST OF CREATE TABLE select '<a name="new_create_tables"><li>TOP 30:CREATE TABLE(NEWEST)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select TABSCHEMA, TABNAME, CREATE_TIME, ALTER_TIME from syscat.tables where tabschema not like ''SYS%'' order by CREATE_TIME desc fetch first 30 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>CREATE_TIME</td>', '<td>ALTER_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>', '<td>',CREATE_TIME,'</td>', '<td>',ALTER_TIME,'</td>' ||'</tr>' from syscat.tables where tabschema not like 'SYS%' order by CREATE_TIME desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TABLE SIZE(PGAES) select '<a name="table_size"><li>TOP 30:TABLE SIZE(PAGES)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select substr(a.tabschema,1,20) as TABSCHEMA, substr(a.tabname,1,20) as TABNAME, a.fpages*b.TBSP_PAGE_SIZE/1024 as TAB_SIZE_KB, a.NPAGES, a.FPAGES, NPAGES-FPAGES as NPAGES_FPAGES, substr(a.TBSPACE,1,20) as TBSPACE, substr(a.INDEX_TBSPACE,1,20) as INDEX_TBSPACE, substr(a.LONG_TBSPACE,1,20) as LONG_TBSPACE from syscat.tables a,sysibmadm.tbsp_utilization b where a.TBSPACEID=b.TBSP_ID and a.tabschema not like ''SYS%'' order by TAB_SIZE_KB desc fetch first 30 rows only </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>TAB_SIZE_KB</td>', '<td>NPAGES</td>', '<td>FPAGES</td>', '<td>NPAGES_FPAGES</td>', '<td>TBSPACE</td>', '<td>INDEX_TBSPACE</td>', '<td>LONG_TBSPACE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',substr(a.tabschema,1,20) as TABSCHEMA,'</td>', '<td>',substr(a.tabname,1,20) as TABNAME,'</td>', '<td>',a.fpages*b.TBSP_PAGE_SIZE/1024 as TAB_SIZE_KB,'</td>', '<td>',a.NPAGES,'</td>', '<td>',a.FPAGES,'</td>', '<td>',NPAGES-FPAGES as NPAGES_FPAGES,'</td>', '<td>',substr(a.TBSPACE,1,20) as TBSPACE,'</td>', '<td>',substr(a.INDEX_TBSPACE,1,20) as INDEX_TBSPACE,'</td>', '<td>',substr(a.LONG_TBSPACE,1,20) as LONG_TBSPACE,'</td>' ||'</tr>' from syscat.tables a,sysibmadm.tbsp_utilization b where a.TBSPACEID=b.TBSP_ID and a.tabschema not like 'SYS%' order by TAB_SIZE_KB desc fetch first 30 rows only; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TABLE SIZE(ADMINTABINFO) select '<a name="table_size"><li>TOP 30:TABLE SIZE(ADMINTABINFO)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT substr(tabschema,1,20) as TABSCHEMA, substr(tabname,1,20) as TABNAME, DATA_OBJECT_P_SIZE, INDEX_OBJECT_P_SIZE, LONG_OBJECT_P_SIZE, LOB_OBJECT_P_SIZE, XML_OBJECT_P_SIZE FROM SYSIBMADM.ADMINTABINFO where tabschema not like ''SYS%'' order by DATA_OBJECT_P_SIZE desc fetch first 30 rows only </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>DATA_OBJECT_P_SIZE</td>', '<td>INDEX_OBJECT_P_SIZE</td>', '<td>LONG_OBJECT_P_SIZE</td>', '<td>LOB_OBJECT_P_SIZE</td>', '<td>XML_OBJECT_P_SIZE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',substr(tabschema,1,20) as TABSCHEMA,'</td>', '<td>',substr(tabname,1,20) as TABNAME,'</td>', '<td>',DATA_OBJECT_P_SIZE,'</td>', '<td>',INDEX_OBJECT_P_SIZE,'</td>', '<td>',LONG_OBJECT_P_SIZE,'</td>', '<td>',LOB_OBJECT_P_SIZE,'</td>', '<td>',XML_OBJECT_P_SIZE,'</td>' ||'</tr>' FROM SYSIBMADM.ADMINTABINFO where tabschema not like 'SYS%' order by DATA_OBJECT_P_SIZE desc fetch first 30 rows only; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TABLE RELATION SIZE select '<a name="table_relation_size"><li>TOP 30:TABLE RELATION SIZE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT substr(tabschema,1,20) as TABSCHEMA, substr(tabname,1,20) as TABNAME, (DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE) AS TOTAL_P_SIZE FROM SYSIBMADM.ADMINTABINFO where tabschema not like ''SYS%'' order by TOTAL_P_SIZE desc fetch first 30 rows only </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>TOTAL_P_SIZE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',substr(tabschema,1,20) as TABSCHEMA,'</td>', '<td>',substr(tabname,1,20) as TABNAME,'</td>', '<td>',(DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE) AS TOTAL_P_SIZE,'</td>' ||'</tr>' FROM SYSIBMADM.ADMINTABINFO where tabschema not like 'SYS%' order by TOTAL_P_SIZE desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TABLE PARTITION select '<a name="tab_data_part"><li>TABLE PARTITION</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, DATAPARTITIONID, DATAPARTITIONNAME, LOWINCLUSIVE, LOWVALUE, HIGHINCLUSIVE, HIGHVALUE from syscat.datapartitions where tabname in (select tabname from syscat.datapartitions group by tabname having max(DATAPARTITIONID)<>0) order by TABNAME,DATAPARTITIONID with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>DATAPARTITIONID</td>', '<td>DATAPARTITIONNAME</td>', '<td>LOWINCLUSIVE</td>', '<td>LOWVALUE</td>', '<td>HIGHINCLUSIVE</td>', '<td>HIGHVALUE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',DATAPARTITIONID,'</td>', '<td>',DATAPARTITIONNAME,'</td>', '<td>',LOWINCLUSIVE,'</td>', '<td>',LOWVALUE,'</td>', '<td>',HIGHINCLUSIVE,'</td>', '<td>',HIGHVALUE,'</td>' ||'</tr>' from syscat.datapartitions where tabname in (select tabname from syscat.datapartitions group by tabname having max(DATAPARTITIONID)<>0) order by TABNAME,DATAPARTITIONID with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE STATUS IS LOAD PENDING OF TABLES select '<a name="load_pending"><li>LOAD PENDING(TABLE)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, load_status from sysibmadm.admintabinfo where load_status=''PENDING'' and tabschema not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>LOAD_STATUS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',load_status,'</td>' ||'</tr>' from sysibmadm.admintabinfo where load_status='PENDING' and tabschema not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --INVALID TABLE select '<a name="invalid_table"><li>INVALID TABLE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, status, INVALIDATE_TIME from syscat.tables where status=''X'' or status=''C'' and TABSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>STATUS</td>', '<td>INVALIDATE_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',status,'</td>', '<td>',INVALIDATE_TIME,'</td>' ||'</tr>' from syscat.tables where status='X' or status='C' and TABSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>STATUS:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>C = Set integrity pending</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>N = Normal</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>X = Inoperative</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --ROWS READ TABLE select '<a name="rows_read_tables"><li>ROWS READ TABLE(MOST)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, rows_read, rows_written, overflow_accesses, page_reorgs from sysibmadm.snaptab where TABSCHEMA not like ''SYS%'' order by ROWS_READ desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>OVERFLOW_ACCESSES</td>', '<td>PAGE_REORGS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',rows_read,'</td>', '<td>',rows_written,'</td>', '<td>',overflow_accesses,'</td>', '<td>',page_reorgs,'</td>' ||'</tr>' from sysibmadm.snaptab where TABSCHEMA not like 'SYS%' order by ROWS_READ desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</a><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --ROWS WRITEEN TABLE select '<a name="rows_writeen_tables"><li>ROWS WRITEEN TABLE(MOST)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, rows_read, rows_written, overflow_accesses, page_reorgs from sysibmadm.snaptab where TABSCHEMA not like ''SYS%'' order by ROWS_WRITTEN desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>OVERFLOW_ACCESSES</td>', '<td>PAGE_REORGS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',rows_read,'</td>', '<td>',rows_written,'</td>', '<td>',overflow_accesses,'</td>', '<td>',page_reorgs,'</td>' ||'</tr>' from sysibmadm.snaptab where TABSCHEMA not like 'SYS%' order by ROWS_WRITTEN desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --ROWS OVERFLOW TABLES select '<a name="rows_overflow_tables"><li>ROWS OVERFLOW TABLES(MOST)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, rows_read, rows_written, overflow_accesses, page_reorgs from sysibmadm.snaptab where TABSCHEMA not like ''SYS%'' order by overflow_accesses desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>OVERFLOW_ACCESSES</td>', '<td>PAGE_REORGS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',rows_read,'</td>', '<td>',rows_written,'</td>', '<td>',overflow_accesses,'</td>', '<td>',page_reorgs,'</td>' ||'</tr>' from sysibmadm.snaptab where TABSCHEMA not like 'SYS%' order by overflow_accesses desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --NEED FOR REORG TABLE select '<a name="page_reorgs_tables"><li>TOP 30:REORG TABLES(PAGE_REORGS)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, rows_read, rows_written, overflow_accesses, page_reorgs from sysibmadm.snaptab where TABSCHEMA not like ''SYS%'' order by page_reorgs desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>OVERFLOW_ACCESSES</td>', '<td>PAGE_REORGS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',rows_read,'</td>', '<td>',rows_written,'</td>', '<td>',overflow_accesses,'</td>', '<td>',page_reorgs,'</td>' ||'</tr>' from sysibmadm.snaptab where TABSCHEMA not like 'SYS%' order by page_reorgs desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --NEED FOR REORG TABLES(NPAGES - FPAGES) select '<a name="need_reorg"><li>TOP 30:REORG TABLES(NPAGES-FPAGES)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select substr(a.tabschema,1,20) as TABSCHEMA, substr(a.tabname,1,20) as TABNAME, a.fpages*b.TBSP_PAGE_SIZE/1024 as TAB_SIZE_KB, a.NPAGES, a.FPAGES, NPAGES-FPAGES as NPAGES_FPAGES, substr(a.TBSPACE,1,20) as TBSPACE, substr(a.INDEX_TBSPACE,1,20) as INDEX_TBSPACE, substr(a.LONG_TBSPACE,1,20) as LONG_TBSPACE from syscat.tables a,sysibmadm.tbsp_utilization b where a.TBSPACEID=b.TBSP_ID and a.tabschema not like ''SYS%'' order by NPAGES_FPAGES desc fetch first 30 rows only </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>TAB_SIZE_KB</td>', '<td>NPAGES</td>', '<td>FPAGES</td>', '<td>NPAGES_FPAGES</td>', '<td>TBSPACE</td>', '<td>INDEX_TBSPACE</td>', '<td>LONG_TBSPACE</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',substr(a.tabschema,1,20) as TABSCHEMA,'</td>', '<td>',substr(a.tabname,1,20) as TABNAME,'</td>', '<td>',a.fpages*b.TBSP_PAGE_SIZE/1024 as TAB_SIZE_KB,'</td>', '<td>',a.NPAGES,'</td>', '<td>',a.FPAGES,'</td>', '<td>',NPAGES-FPAGES as NPAGES_FPAGES,'</td>', '<td>',substr(a.TBSPACE,1,20) as TBSPACE,'</td>', '<td>',substr(a.INDEX_TBSPACE,1,20) as INDEX_TBSPACE,'</td>', '<td>',substr(a.LONG_TBSPACE,1,20) as LONG_TBSPACE,'</td>' ||'</tr>' from syscat.tables a,sysibmadm.tbsp_utilization b where a.TBSPACEID=b.TBSP_ID and a.tabschema not like 'SYS%' order by NPAGES_FPAGES desc fetch first 30 rows only; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS TIME NULL OF TABLES select '<a name="statis_time_null_table"><li>TOP 30:STATIS TIME NULL(TABLES)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select tabschema, tabname, stats_time from syscat.tables where stats_time is null and tabschema not like ''SYS%'' fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>STATS_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',stats_time,'</td>' ||'</tr>' from syscat.tables where stats_time is null and tabschema not like 'SYS%' fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS THE NUMBER OF STATIS TIME NULL(TABLES) select '<a>COUNT(STATIS_TIME_NULL) TABLES</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select COUNT(*) from syscat.tables where stats_time is null and tabschema not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.tables where stats_time is null and tabschema not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS TIME(> 30 DAYS) select '<a name="statis_time_30_table"><li>TOP 30:STATIS TIME > 30 DAYS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select ,tabschema, ,tabname, ,stats_time from syscat.tables where tabschema not like ''SYS%'' and stats_time < current timestamp - 30 days order by stats_time desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>STATS_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',stats_time,'</td>' ||'</tr>' from syscat.tables where tabschema not like 'SYS%' and stats_time < current timestamp - 30 days order by stats_time desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS THE NUMBER OF STATIS TIME > 30DAYS(TABLES) select '<a>COUNT(TABLES)</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select COUNT(*) from syscat.tables where tabschema not like ''SYS%'' and stats_time < current timestamp - 30 days with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.tables where tabschema not like 'SYS%' and stats_time < current timestamp - 30 days with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --USER INDEXES select '<a name="user_indexes"><li>TOP 30:USER INDEXES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select INDSCHEMA, INDNAME, INDEXTYPE, LASTUSED, CREATE_TIME, TABSCHEMA, TABNAME from syscat.indexes where INDSCHEMA not like ''SYS%'' order by CREATE_TIME desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>INDSCHEMA</td>', '<td>INDNAME</td>', '<td>INDEXTYPE</td>', '<td>LASTUSED</td>', '<td>CREATE_TIME</td>', '<td>TABSCHEMA</td>', '<td>TABNAME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',INDSCHEMA,'</td>', '<td>',INDNAME,'</td>', '<td>',INDEXTYPE,'</td>', '<td>',LASTUSED,'</td>', '<td>',CREATE_TIME,'</td>', '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>' ||'</tr>' from syscat.indexes where INDSCHEMA not like 'SYS%' order by CREATE_TIME desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --COUNT USER INDEXES select '<a>COUNT USER INDEXES</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select COUNT(*) from syscat.indexes where INDSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.indexes where INDSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --INVALID INDEXES select '<a name="invalid_index"><li>INVALID INDEXES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select INDSCHEMA, INDNAME, TABSCHEMA, TABNAME, COMPRESS_ATTR, INDEX_COMPRESSED, INDEX_PARTITIONING, INDEX_REQUIRES_REBUILD, LARGE_RIDS from TABLE(sysproc.admin_get_index_info('''','''','''')) where INDEX_REQUIRES_REBUILD=''Y'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>INDSCHEMA</td>', '<td>INDNAME</td>', '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>COMPRESS_ATTR</td>', '<td>INDEX_COMPRESSED</td>', '<td>INDEX_PARTITIONING</td>', '<td>INDEX_REQUIRES_REBUILD</td>', '<td>LARGE_RIDS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',INDSCHEMA,'</td>', '<td>',INDNAME,'</td>', '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>', '<td>',COMPRESS_ATTR,'</td>', '<td>',INDEX_COMPRESSED,'</td>', '<td>',INDEX_PARTITIONING,'</td>', '<td>',INDEX_REQUIRES_REBUILD,'</td>', '<td>',LARGE_RIDS,'</td>' ||'</tr>' from TABLE(sysproc.admin_get_index_info('','','')) where INDEX_REQUIRES_REBUILD='Y' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>COMPRESS_ATTR:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>"Y" = Index compression is enabled</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"N" = Index compression is not enabled</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>INDEX_COMPRESSED:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>"Y" = Index is in compressed format</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"N" = Index is in uncompressed format</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>If the physical index format does not match the compression attribute, an index reorganization is needed to convert the index to the defined format. If the table or index is in error when this function is executed, then this value is NULL.</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>INDEX_PARTITIONING:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>"N" = Nonpartitioned index</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"P" = Partitioned index</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>Blank = Index is not on a partitioned table</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>INDEX_REQUIRES_REBUILD:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>"Y" if the index defined on the table or data partition requires a rebuild</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"N" otherwise</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>If the table is in error when this function is executed, then this value is NULL.</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>LARGE_RIDS:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>Indicates whether or not the index is using large row IDs (RIDs) (4 byte page number, 2 byte slot number).</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"Y" indicates that the index is using large RIDs</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"N" indicates that the index is not using large RIDs</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>"P" (pending) indicates that the table that the index is defined on supports large RIDs (that is, the table is in a large table space), but the index for the table or data partition has not been reorganized or rebuilt yet. Therefore, the table is still using 4 byte RIDs, and action must be taken to convert the table or index to large RIDs.</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>If the table is in error where this function is executed, then this value is NULL.</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS TIME NULL(INDEXES) select '<a name="statis_time_null_index"><li>TOP 30:STATIS TIME NULL(INDEXES)</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select indschema, INDNAME, stats_time, tabschema, tabname, from syscat.indexes where stats_time is null and indschema not like ''SYS%'' fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>indschema</td>', '<td>INDNAME</td>', '<td>stats_time</td>', '<td>tabschema</td>', '<td>tabname</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',indschema,'</td>', '<td>',INDNAME,'</td>', '<td>',stats_time,'</td>', '<td>',tabschema,'</td>', '<td>',tabname,'</td>' ||'</tr>' from syscat.indexes where stats_time is null and indschema not like 'SYS%' fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --STATIS THE NUMBER OF STATIS TIME NULL(INDEXES) select '<a>COUNT(INDEXES)</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select COUNT(*) from syscat.indexes where stats_time is null and indschema not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.indexes where stats_time is null and indschema not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1; --STATIS TIME > 30 DAYS(INDEXES) select '<a name="statis_time_30_index"><li>TOP 30:STATIS TIME > 30 DAYS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select indschema, indname, tabschema, tabname, stats_time from syscat.indexes where indschema not like ''SYS%'' and stats_time < current timestamp - 30 days order by stats_time desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>INDSCHEMA</td>', '<td>INDNAME</td>', '<td>TABSCHEMA</td>', '<td>TABNAME</td>', '<td>STATS_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',indschema,'</td>', '<td>',indname,'</td>', '<td>',tabschema,'</td>', '<td>',tabname,'</td>', '<td>',stats_time,'</td>' ||'</tr>' from syscat.indexes where indschema not like 'SYS%' and stats_time < current timestamp - 30 days order by stats_time desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 stats_time with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 stats_time with ur; --STATIS THE NUMBER OF STATIS TIME > 30 DAYS(INDEXES) select '<a>COUNT(INDEXES)</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select COUNT(*) from syscat.indexes where indschema not like ''SYS%'' and stats_time < current timestamp - 30 days with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.indexes where indschema not like 'SYS%' and stats_time < current timestamp - 30 days with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; --USER VIEWS select '<a name="user_views"><li>TOP 30:USER VIEWS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select VIEWSCHEMA,VIEWNAME from syscat.views where VIEWSCHEMA not like ''SYS%'' fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>VIEWSCHEMA</td>', '<td>VIEWNAME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',VIEWSCHEMA,'</td>', '<td>',VIEWNAME,'</td>' ||'</tr>' from syscat.views where VIEWSCHEMA not like ''SYS%'' fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --COUNT USER VIEWS select '<a>COUNT USER VIEWS</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select COUNT(*) from syscat.views where VIEWSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.views where VIEWSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --INVALID VIEWS select '<a name="invalid_view"><li>INVALID VIEWS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select VIEWSCHEMA, VIEWNAME, VALID from syscat.views where valid=''N'' or valid=''X'' and VIEWSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>VIEWSCHEMA</td>', '<td>VIEWNAME</td>', '<td>VALID</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',VIEWSCHEMA,'</td>', '<td>',VIEWNAME,'</td>', '<td>',VALID,'</td>' ||'</tr>' from syscat.views where valid='N' or valid='X' and VIEWSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>VALID:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>N = View or materialized query table definition is invalid</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>X = View or materialized query table definition is inoperative and must be recreated</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>Y = View or materialized query table definition is valid</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --USER TERIGGER select '<a name="user_trigger"><li>TOP 10:USER TRIGGERS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select TRIGSCHEMA, TRIGNAME, CREATE_TIME, TABSCHEMA, TABNAME from syscat.TRIGGERS where TRIGSCHEMA not like ''SYS%'' order by CREATE_TIME desc fetch first 10 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TRIGSCHEMA</td>', '<td>TRIGNAME</td>', '<td>CREATE_TIME</td>', '<td>TABSCHEMA</td>', '<td>TABNAME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',TRIGSCHEMA,'</td>', '<td>',TRIGNAME,'</td>', '<td>',CREATE_TIME,'</td>', '<td>',TABSCHEMA,'</td>', '<td>',TABNAME,'</td>' ||'</tr>' from syscat.TRIGGERS where TRIGSCHEMA not like 'SYS%' order by CREATE_TIME desc fetch first 10 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE NUMBER OF USER TRIGGERS select '<a>COUNT USER TRIGGER</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select count(*) from syscat.TRIGGERS where TRIGSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.TRIGGERS where TRIGSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE STATUS IS INVALID OF USER TRIGGERS select '<a name="invalid_trigger"><li>INVALID TRIGGERS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select trigschema, trigname, valid from syscat.triggers where VALID=''N'' and trigschema not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TRIGSCHEMA</td>', '<td>TRIGNAME</td>', '<td>VALID</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',trigschema,'</td>', '<td>',trigname,'</td>', '<td>',valid,'</td>' ||'</tr>' from syscat.triggers where VALID='N' and trigschema not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>VALID:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>N = Trigger is invalid</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>X = Trigger is inoperative and must be re-created</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>Y = Trigger is valid</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --USER PACKAGE select '<a name="user_package"><li>USER PACKAGES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select PKGSCHEMA, PKGNAME, CREATE_TIME from syscat.PACKAGES where PKGSCHEMA not like ''SYS%'' order by CREATE_TIME desc fetch first 10 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>PKGSCHEMA</td>', '<td>PKGNAME</td>', '<td>CREATE_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',PKGSCHEMA,'</td>', '<td>',PKGNAME,'</td>', '<td>',CREATE_TIME,'</td>' ||'</tr>' from syscat.PACKAGES where PKGSCHEMA not like 'SYS%' order by CREATE_TIME desc fetch first 10 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE NUMBER OF USER PACKAGES select '<a name="count_package"><li>COUNT PACKAGES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select count(*) from syscat.PACKAGES where PKGSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',COUNT(*),'</td>' ||'</tr>' from syscat.PACKAGES where PKGSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --INVALID PACKAGES select '<a name="invalid_package"><li>INVALID PACKAGES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select PKGSCHEMA, PKGNAME, valid from syscat.packages where VALID=''X'' or VALID=''N'' and PKGSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>PKGSCHEMA</td>', '<td>PKGNAME</td>', '<td>VALID</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',PKGSCHEMA,'</td>', '<td>',PKGNAME,'</td>', '<td>',valid,'</td>' ||'</tr>' from syscat.packages where VALID='X' or VALID='N' and PKGSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>VALID:</code></summary>' from sysibm.SYSDUMMY1 with ur; select '<code>N = Needs rebinding</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>V = Validate at run time</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>X = Package is inoperative because some function instance on which it depends has been dropped; explicit rebind is needed</code><br>' from sysibm.SYSDUMMY1 with ur; select '<code>Y = Valid</code><br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK USER ROUTINE select '<a name="user_routine"><li>USER ROUTINES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select ROUTINESCHEMA, ROUTINENAME, CREATE_TIME from syscat.ROUTINES where ROUTINESCHEMA not like ''SYS%'' order by CREATE_TIME desc fetch first 10 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>ROUTINESCHEMA</td>', '<td>ROUTINENAME</td>', '<td>CREATE_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',routineschema,'</td>', '<td>',routinename,'</td>', '<td>',CREATE_TIME,'</td>' ||'</tr>' from syscat.ROUTINES where ROUTINESCHEMA not like 'SYS%' order by CREATE_TIME desc fetch first 10 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE NUMBER OF USER ROUTINE select '<a name="count_routine">COUNT ROUTINES</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select count(*) from syscat.ROUTINES where ROUTINESCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',count(*),'</td>' ||'</tr>' from syscat.ROUTINES where ROUTINESCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE STATUS IS INVALID OF USER ROUTINE select '<a name="invalid_routine"><li>INVALID ROUTINES</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select routineschema, routinename, valid from syscat.routines where valid!=''Y'' and valid!='' and routineschema not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>ROUTINESCHEMA</td>', '<td>ROUTINENAME</td>', '<td>VALID</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',routineschema,'</td>', '<td>',routinename,'</td>', '<td>',valid,'</td>' ||'</tr>' from syscat.routines where valid!='Y' and valid!='' and routineschema not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<details>' from sysibm.SYSDUMMY1 with ur; select '<summary><a>VALID:</code></br></summary>' from sysibm.SYSDUMMY1 with ur; select '<code> Applies to LANGUAGE = SQL and routines having parameters with default; blank otherwise.</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code> N = Routine needs rebinding</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code> X = Routine is inoperative and must be recreated</code></br>' from sysibm.SYSDUMMY1 with ur; select '<code> Y = Routine is valid</code></br>' from sysibm.SYSDUMMY1 with ur; select '</details>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK USER UNCTIONS select '<a name="user_function"><li>USER FUNCTION</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select FUNCSCHEMA,FUNCNAME,CREATE_TIME from SYSCAT.FUNCTIONS where FUNCSCHEMA not like ''SYS%'' order by CREATE_TIME desc fetch first 10 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>FUNCSCHEMA</td>', '<td>FUNCNAME</td>', '<td>CREATE_TIME</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',FUNCSCHEMA,'</td>', '<td>',FUNCNAME,'</td>', '<td>',CREATE_TIME,'</td>' ||'</tr>' from SYSCAT.FUNCTIONS where FUNCSCHEMA not like 'SYS%' order by CREATE_TIME desc fetch first 10 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --THE THE NUMBER OF USER FUNCTIONS select '<a name="count_function">COUNT FUNCTION</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select count(*) from SYSCAT.FUNCTIONS where FUNCSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',count(*),'</td>' ||'</tr>' from SYSCAT.FUNCTIONS where FUNCSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK USER PROCEDURE select '<a name="user_procedure"><li>USER PROCEDURE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select PROCSCHEMA,PROCNAME,CREATE_TIME,VALID from syscat.PROCEDURES where PROCSCHEMA not like ''SYS%'' order by CREATE_TIME desc fetch first 10 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>PROCSCHEMA</td>', '<td>PROCNAME</td>', '<td>CREATE_TIME</td>', '<td>VALID</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',PROCSCHEMA,'</td>', '<td>',PROCNAME,'</td>', '<td>',CREATE_TIME,'</td>', '<td>',VALID,'</td>' ||'</tr>' from syscat.PROCEDURES where PROCSCHEMA not like 'SYS%' order by CREATE_TIME desc fetch first 10 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CHECK THE NUMBER OF USER PROCEDURE select '<a name="count_procedure">COUNT PROCEDURE</a><br>' from sysibm.SYSDUMMY1 with ur; select '<code> select count(*) from syscat.PROCEDURES where PROCSCHEMA not like ''SYS%'' with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="color:black;background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>TOTAL_ROWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',count(*),'</td>' ||'</tr>' from syscat.PROCEDURES where PROCSCHEMA not like 'SYS%' with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_objects">[db_objects]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code></br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE HIT RATE -- -- -- ----------------------------------------------------------------------- --BUFFERPOOL HIT RATE select '<a name="buffer_hit_rate"><li>BUFFERPOOL HIT RATE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, bp_name, data_hit_ratio_percent, index_hit_ratio_percent, total_hit_ratio_percent from sysibmadm.bp_hitratio with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>bp_name</td>', '<td>data_hit_ratio_percent</td>', '<td>index_hit_ratio_percent</td>', '<td>total_hit_ratio_percent</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',bp_name,'</td>', '<td>',data_hit_ratio_percent,'</td>', '<td>',index_hit_ratio_percent,'</td>', '<td>',total_hit_ratio_percent,'</td>' ||'</tr>' from sysibmadm.bp_hitratio with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_hit_rate">[db_hit_rate]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --BUFFERPOOL READ TIME select '<a name="buffer_read_time"><li>BUFFERPOOL READ TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT DBPARTITIONNUM, SUBSTR(BP_NAME, 1, 15) AS BP_NAME, TOTAL_PHYSICAL_READS, AVERAGE_READ_TIME_MS, TOTAL_ASYNC_READS, AVERAGE_ASYNC_READ_TIME_MS, TOTAL_SYNC_READS, AVERAGE_SYNC_READ_TIME_MS, PERCENT_SYNC_READS FROM SYSIBMADM.BP_READ_IO with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>BP_NAME</td>', '<td>TOTAL_PHYSICAL_READS</td>', '<td>AVERAGE_READ_TIME_MS</td>', '<td>TOTAL_ASYNC_READS</td>', '<td>AVERAGE_ASYNC_READ_TIME_MS</td>', '<td>TOTAL_SYNC_READS</td>', '<td>AVERAGE_SYNC_READ_TIME_MS</td>', '<td>PERCENT_SYNC_READS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',BP_NAME,'</td>', '<td>',TOTAL_PHYSICAL_READS,'</td>', '<td>',AVERAGE_READ_TIME_MS,'</td>', '<td>',TOTAL_ASYNC_READS,'</td>', '<td>',AVERAGE_ASYNC_READ_TIME_MS,'</td>', '<td>',TOTAL_SYNC_READS,'</td>', '<td>',AVERAGE_SYNC_READ_TIME_MS,'</td>', '<td>',PERCENT_SYNC_READS,'</td>' ||'</tr>' from SYSIBMADM.BP_READ_IO with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_hit_rate">[db_hit_rate]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --BUFFERPOOL WRITE TIME select '<a name="buffer_write_time"><li>BUFFERPOOL WRITE TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT DBPARTITIONNUM, SUBSTR(BP_NAME, 1, 15) AS BP_NAME, TOTAL_WRITES, AVERAGE_WRITE_TIME_MS, TOTAL_ASYNC_WRITES, PERCENT_WRITES_ASYNC, AVERAGE_ASYNC_WRITE_TIME_MS, TOTAL_SYNC_WRITES, AVERAGE_SYNC_WRITE_TIME_MS FROM SYSIBMADM.BP_WRITE_IO with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>BP_NAME</td>', '<td>TOTAL_WRITES</td>', '<td>AVERAGE_WRITE_TIME_MS</td>', '<td>TOTAL_ASYNC_WRITES</td>', '<td>PERCENT_WRITES_ASYNC</td>', '<td>AVERAGE_ASYNC_WRITE_TIME_MS</td>', '<td>TOTAL_SYNC_WRITES</td>', '<td>AVERAGE_SYNC_WRITE_TIME_MS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',BP_NAME,'</td>', '<td>',TOTAL_WRITES,'</td>', '<td>',AVERAGE_WRITE_TIME_MS,'</td>', '<td>',TOTAL_ASYNC_WRITES,'</td>', '<td>',PERCENT_WRITES_ASYNC,'</td>', '<td>',AVERAGE_ASYNC_WRITE_TIME_MS,'</td>', '<td>',TOTAL_SYNC_WRITES,'</td>', '<td>',AVERAGE_SYNC_WRITE_TIME_MS,'</td>' ||'</tr>' FROM SYSIBMADM.BP_WRITE_IO with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_hit_rate">[db_hit_rate]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --CATALOG CACHE HIT RATE select '<a name="catalog_cache_hit_rate"><li>CATALOG CACHE HIT RATE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, (1-(CAT_CACHE_INSERTS/CAT_CACHE_LOOKUPS))*100, CAT_CACHE_OVERFLOWS from sysibmadm.snapdb with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>CCHR</td>', '<td>CAT_CACHE_OVERFLOWS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',(1-(CAT_CACHE_INSERTS/CAT_CACHE_LOOKUPS))*100,'</td>', '<td>',CAT_CACHE_OVERFLOWS,'</td>' ||'</tr>' from sysibmadm.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_hit_rate">[db_hit_rate]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --PACKAGE HIT RATE select '<a name="package_hit_rate"><li>PACKAGE HIT RATE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select DBPARTITIONNUM, PKG_CACHE_INSERTS, PKG_CACHE_LOOKUPS, 1-dec((double(PKG_CACHE_INSERTS)/double(PKG_CACHE_LOOKUPS)),6,4) AS PKG_HIT from sysibmadm.snapdb with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>PKG_CACHE_INSERTS</td>', '<td>PKG_CACHE_LOOKUPS</td>', '<td>(1-dec((double(PKG_CACHE_INSERTS)/double(PKG_CACHE_LOOKUPS)),6,4))*100</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',PKG_CACHE_INSERTS,'</td>', '<td>',PKG_CACHE_LOOKUPS,'</td>', '<td>',(1-dec((double(PKG_CACHE_INSERTS)/double(PKG_CACHE_LOOKUPS)),6,4))*100,'</td>' ||'</tr>' from sysibmadm.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_hit_rate">[db_hit_rate]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- CONSUME RESOURCE OF SQL -- -- -- ----------------------------------------------------------------------- --CONNECT APPLICATIONS select '<a name="connect_application"><li>CONNECT APPLICATIONS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DBPARTITIONNUM, TOTAL_CONS, APPLS_CUR_CONS, COMMIT_SQL_STMTS, ROLLBACK_SQL_STMTS, INT_ROLLBACKS, INT_COMMITS, COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS+INT_ROLLBACKS+INT_COMMITS as TRANSCATIONS, DYNAMIC_SQL_STMTS, STATIC_SQL_STMTS, DYNAMIC_SQL_STMTS+STATIC_SQL_STMTS as DYNAMIC_STATIC_SQL_STMTS from SYSIBMADM.SNAPDB with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SNAPSHOT_TIMESTAMP</td>', '<td>DBPARTITIONNUM</td>', '<td>TOTAL_CONS</td>', '<td>APPLS_CUR_CONS</td>', '<td>COMMIT_SQL_STMTS</td>', '<td>ROLLBACK_SQL_STMTS</td>', '<td>INT_ROLLBACKS</td>', '<td>INT_COMMITS</td>', '<td>TRANSCATIONS</td>', '<td>DYNAMIC_SQL_STMTS</td>', '<td>STATIC_SQL_STMTS</td>', '<td>DYNAMIC_STATIC_SQL_STMTS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SNAPSHOT_TIMESTAMP,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',TOTAL_CONS,'</td>', '<td>',APPLS_CUR_CONS,'</td>', '<td>',COMMIT_SQL_STMTS,'</td>', '<td>',ROLLBACK_SQL_STMTS,'</td>', '<td>',INT_ROLLBACKS,'</td>', '<td>',INT_COMMITS,'</td>', '<td>',COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS+INT_ROLLBACKS+INT_COMMITS as TRANSCATIONS,'</td>', '<td>',DYNAMIC_SQL_STMTS,'</td>', '<td>',STATIC_SQL_STMTS,'</td>', '<td>',DYNAMIC_SQL_STMTS+STATIC_SQL_STMTS as DYNAMIC_STATIC_SQL_STMTS,'</td>' ||'</tr>' from SYSIBMADM.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TOTAL TRANSCATIONS select '<a name="total_transcations"><li>NUMS OF TRANSCATIONS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DBPARTITIONNUM, COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS+INT_ROLLBACKS+INT_COMMITS AS TRANSACTIONS, COMMIT_SQL_STMTS, ROLLBACK_SQL_STMTS, INT_ROLLBACKS, INT_COMMITS from SYSIBMADM.snapdb with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SNAPSHOT_TIMESTAMP</td>', '<td>DBPARTITIONNUM</td>', '<td>TRANSACTIONS</td>', '<td>COMMIT_SQL_STMTS</td>', '<td>ROLLBACK_SQL_STMTS</td>', '<td>INT_ROLLBACKS</td>', '<td>INT_COMMITS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SNAPSHOT_TIMESTAMP,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS+INT_ROLLBACKS+INT_COMMITS as TRANSACTIONS,'</td>', '<td>',COMMIT_SQL_STMTS,'</td>', '<td>',ROLLBACK_SQL_STMTS,'</td>', '<td>',INT_ROLLBACKS,'</td>', '<td>',INT_COMMITS,'</td>' ||'</tr>' from SYSIBMADM.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --THE NUMBERS OF QUERY SQL FOR EVERY STMTS select '<a name="select_sql_stmts"><li>THE NUMBERS OF QUERY SQL FOR EVERY STMTS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DBPARTITIONNUM, SELECT_SQL_STMTS/(COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS+INT_ROLLBACKS+INT_COMMITS) as NUM_SQL, COMMIT_SQL_STMTS, ROLLBACK_SQL_STMTS, INT_ROLLBACKS, INT_COMMITS from SYSIBMADM.snapdb with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SNAPSHOT_TIMESTAMP</td>', '<td>DBPARTITIONNUM</td>', '<td>NUM_SQL</td>', '<td>COMMIT_SQL_STMTS</td>', '<td>ROLLBACK_SQL_STMTS</td>', '<td>INT_ROLLBACKS</td>', '<td>INT_COMMITS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SNAPSHOT_TIMESTAMP,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',SELECT_SQL_STMTS/(COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS+INT_ROLLBACKS+INT_COMMITS) as NUM_SQL,'</td>', '<td>',COMMIT_SQL_STMTS,'</td>', '<td>',ROLLBACK_SQL_STMTS,'</td>', '<td>',INT_ROLLBACKS,'</td>', '<td>',INT_COMMITS,'</td>' ||'</tr>' from SYSIBMADM.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --THE NUMS OF INSERT DELETE UPDATE FOR EVERY STMTS select '<a name="insert_delete_update_sql"><li>THE NUMBERS OF INSERT DELETE UPDATE FOR EVERY STMTS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DBPARTITIONNUM, DEC(DOUBLE(UID_SQL_STMTS)/DOUBLE(COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS),10,2) AS INSERT_DELETE_UPDATE, COMMIT_SQL_STMTS, ROLLBACK_SQL_STMTS from SYSIBMADM.snapdb with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SNAPSHOT_TIMESTAMP</td>', '<td>DBPARTITIONNUM</td>', '<td>INSERT_DELETE_UPDATE</td>', '<td>COMMIT_SQL_STMTS</td>', '<td>ROLLBACK_SQL_STMTS</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SNAPSHOT_TIMESTAMP,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',DEC(DOUBLE(UID_SQL_STMTS)/DOUBLE(COMMIT_SQL_STMTS+ROLLBACK_SQL_STMTS),10,2) as INSERT_DELETE_UPDATE,'</td>', '<td>',COMMIT_SQL_STMTS,'</td>', '<td>',ROLLBACK_SQL_STMTS,'</td>' ||'</tr>' from SYSIBMADM.snapdb with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TOTAL EXECUTE TIME select '<a name="total_time_sql"><li>TOP 30:TOTAL EXECUTE TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, dec(double(TOTAL_EXEC_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME, TOTAL_EXEC_TIME_MS, dec(double(TOTAL_EXEC_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by TOTAL_EXEC_TIME,TOTAL_EXEC_TIME_MS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>AVG_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>AVG_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',dec(double(TOTAL_EXEC_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',dec(double(TOTAL_EXEC_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by TOTAL_EXEC_TIME,TOTAL_EXEC_TIME_MS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --AVG EXECUTE TIME select '<a name="avg_time_sql"><li>TOP 30:AVG EXECUTE TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, dec(double(TOTAL_EXEC_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME, TOTAL_EXEC_TIME_MS, dec(double(TOTAL_EXEC_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by AVG_EXEC_TIME,AVG_EXEC_TIME_MS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>AVG_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>AVG_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',dec(double(TOTAL_EXEC_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',dec(double(TOTAL_EXEC_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by AVG_EXEC_TIME,AVG_EXEC_TIME_MS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --NUMBER EXECUTE select '<a name="num_executions"><li>TOP 30:NUMBER EXECUTE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by NUM_EXECUTIONS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by NUM_EXECUTIONS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TOTAL USER CPU TIME select '<a name="total_user_cpu_sql"><li>TOP 30:TOTAL USER CPU TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, dec(double(TOTAL_USR_CPU_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, dec(double(TOTAL_USR_CPU_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by TOTAL_USR_CPU_TIME,TOTAL_USR_CPU_TIME_MS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>AVG_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>AVG_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',dec(double(TOTAL_USR_CPU_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',dec(double(TOTAL_USR_CPU_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by TOTAL_USR_CPU_TIME,TOTAL_USR_CPU_TIME_MS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --AVG USER CPU TIME select '<a name="total_user_cpu_sql"><li>TOP 30:AVG USER CPU TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, dec(double(TOTAL_USR_CPU_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, dec(double(TOTAL_USR_CPU_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by AVG_USR_CPU_TIME,AVG_USR_CPU_TIME_MS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>AVG_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>AVG_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',dec(double(TOTAL_USR_CPU_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',dec(double(TOTAL_USR_CPU_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by AVG_USR_CPU_TIME,AVG_USR_CPU_TIME_MS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --查看总系统CPU时间长的SQL select '<a name="total_sys_cpu_sql"><li>TOP 30:TOTAL SYS CPU TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by TOTAL_SYS_CPU_TIME,TOTAL_SYS_CPU_TIME_MS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by TOTAL_SYS_CPU_TIME,TOTAL_SYS_CPU_TIME_MS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --AVG SYS CPU TIME select '<a name="avg_sys_cpu_sql"><li>TOP 30:AVG SYS CPU TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, dec(double(TOTAL_SYS_CPU_TIME)/double(NUM_EXECUTIONS),20,2)as AVG_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, dec(double(TOTAL_SYS_CPU_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by AVG_SYS_CPU_TIME,AVG_SYS_CPU_TIME_MS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>AVG_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>AVG_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',dec(double(TOTAL_SYS_CPU_TIME)/double(NUM_EXECUTIONS),20,2)as AVG_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',dec(double(TOTAL_SYS_CPU_TIME_MS)/double(NUM_EXECUTIONS),20,2) as AVG_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by AVG_SYS_CPU_TIME,AVG_SYS_CPU_TIME_MS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TOTAL SORTS NUM select '<a name="stmt_sorts"><li>TOP 30:TOTAL SORTS NUM</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by STMT_SORTS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by STMT_SORTS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --AVG SORTS NUM select '<a name="avg_stmt_sorts"><li>TOP 30:AVG SORTS NUM</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, dec(double(STMT_SORTS)/double(NUM_EXECUTIONS),20,2)as AVG_STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by AVG_STMT_SORTS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>AVG_STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',dec(double(STMT_SORTS)/double(NUM_EXECUTIONS),20,2)as AVG_STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by AVG_STMT_SORTS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --TOTAL SORTS TIME select '<a name="total_sort_time"><li>TOP 30:TOTAL SORTS TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by TOTAL_SORT_TIME desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by TOTAL_SORT_TIME desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --AVG SORTS TIME select '<a name="avg_sort_time"><li>TOP 30:AVG SORTS TIME</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, dec(double(TOTAL_SORT_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by AVG_SORT_TIME desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>AVG_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',dec(double(TOTAL_SORT_TIME)/double(NUM_EXECUTIONS),20,2) as AVG_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by AVG_SORT_TIME desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --SORT OVERFLOWS select '<a name="sort_overflows"><li>TOP 30:SORT OVERFLOWS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, TOTAL_SORT_TIME, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by SORT_OVERFLOWS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by SORT_OVERFLOWS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --AVG SORT OVERFLOWS select '<a name="sort_overflows"><li>TOP 30:AVG SORT OVERFLOWS</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select NUM_EXECUTIONS, TOTAL_USR_CPU_TIME, TOTAL_USR_CPU_TIME_MS, TOTAL_SYS_CPU_TIME, TOTAL_SYS_CPU_TIME_MS, TOTAL_EXEC_TIME, TOTAL_EXEC_TIME_MS, ROWS_READ, ROWS_WRITTEN, STMT_SORTS, SORT_OVERFLOWS, dec(double(SORT_OVERFLOWS)/double(NUM_EXECUTIONS),20,2) as AVG_SORT_OVERFLOWS, STMT_TEXT from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like ''%<_%>%'' order by AVG_SORT_OVERFLOWS desc fetch first 30 rows only with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>NUM_EXECUTIONS</td>', '<td>TOTAL_USR_CPU_TIME</td>', '<td>TOTAL_USR_CPU_TIME_MS</td>', '<td>TOTAL_SYS_CPU_TIME</td>', '<td>TOTAL_SYS_CPU_TIME_MS</td>', '<td>TOTAL_EXEC_TIME</td>', '<td>TOTAL_EXEC_TIME_MS</td>', '<td>ROWS_READ</td>', '<td>ROWS_WRITTEN</td>', '<td>STMT_SORTS</td>', '<td>SORT_OVERFLOWS</td>', '<td>AVG_SORT_OVERFLOWS</td>', '<td>TOTAL_SORT_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',NUM_EXECUTIONS,'</td>', '<td>',TOTAL_USR_CPU_TIME,'</td>', '<td>',TOTAL_USR_CPU_TIME_MS,'</td>', '<td>',TOTAL_SYS_CPU_TIME,'</td>', '<td>',TOTAL_SYS_CPU_TIME_MS,'</td>', '<td>',TOTAL_EXEC_TIME,'</td>', '<td>',TOTAL_EXEC_TIME_MS,'</td>', '<td>',ROWS_READ,'</td>', '<td>',ROWS_WRITTEN,'</td>', '<td>',STMT_SORTS,'</td>', '<td>',SORT_OVERFLOWS,'</td>', '<td>',dec(double(SORT_OVERFLOWS)/double(NUM_EXECUTIONS),20,2) as AVG_SORT_OVERFLOWS,'</td>', '<td>',TOTAL_SORT_TIME,'</td>', '<td>',STMT_TEXT,'</td>' ||'</tr>' from SYSIBMADM.SNAPDYN_SQL where STMT_TEXT not like '%<_%>%' order by AVG_SORT_OVERFLOWS desc fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --SORT OVERFLOW PERCENT select '<a name="sort_overflows_percent"><li>SORT OVERFLOWS PERCENT</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> SELECT DBPARTITIONNUM, DB_NAME, dec(double(SORT_OVERFLOWS)/double(TOTAL_SORTS)*100,20,2) as PERCENT FROM SYSIBMADM.SNAPDB with ur </code>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>DB_NAME</td>', '<td>PERCENT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DBPARTITIONNUM,'</td>', '<td>',DB_NAME,'</td>', '<td>',dec(double(SORT_OVERFLOWS)/double(TOTAL_SORTS)*100,20,2),'</td>' ||'</tr>' FROM SYSIBMADM.SNAPDB with ur; select '</table>' from sysibm.SYSDUMMY1 with ur; select '<a href="#db_sql">[db_sql]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur; ----------------------------------------------------------------------- -- -- -- DATABASE LOG -- -- -- ----------------------------------------------------------------------- --online log select '<a name="online_log"><li>ONLINE LOG USAGE</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select SNAPSHOT_TIMESTAMP, DBPARTITIONNUM, DB_NAME, FIRST_ACTIVE_LOG, LAST_ACTIVE_LOG, CURRENT_ACTIVE_LOG, CURRENT_ARCHIVE_LOG, MEMBER from sysibmadm.SNAPDETAILLOG with ur </code><br>' from SYSIBM.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>SNAPSHOT_TIMESTAMP</td>', '<td>DBPARTITIONNUM</td>', '<td>DB_NAME</td>', '<td>FIRST_ACTIVE_LOG</td>', '<td>LAST_ACTIVE_LOG</td>', '<td>CURRENT_ACTIVE_LOG</td>', '<td>CURRENT_ARCHIVE_LOG</td>', '<td>MEMBER</td>' ||'</tr>' from SYSIBM.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',SNAPSHOT_TIMESTAMP,'</td>', '<td>',DBPARTITIONNUM,'</td>', '<td>',DB_NAME,'</td>', '<td>',FIRST_ACTIVE_LOG,'</td>', '<td>',LAST_ACTIVE_LOG,'</td>', '<td>',CURRENT_ACTIVE_LOG,'</td>', '<td>',CURRENT_ARCHIVE_LOG,'</td>', '<td>',MEMBER,'</td>' ||'</tr>' from SYSIBMADM.SNAPDETAILLOG with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_logs">[db_logs]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --ONLINE LOG SPACE USAGE select '<a name="online_log_percent"><li>Online log space usage</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select substr(DB_NAME,1,10) as DB_NAME, LOG_UTILIZATION_PERCENT, TOTAL_LOG_USED_KB, TOTAL_LOG_AVAILABLE_KB, TOTAL_LOG_USED_TOP_KB, DBPARTITIONNUM from SYSIBMADM.LOG_UTILIZATION with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DB_NAME</td>', '<td>LOG_UTILIZATION_PERCENT</td>', '<td>TOTAL_LOG_USED_KB</td>', '<td>TOTAL_LOG_AVAILABLE_KB</td>', '<td>TOTAL_LOG_USED_TOP_KB</td>', '<td>DBPARTITIONNUM</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',DB_NAME,'</td>', '<td>',LOG_UTILIZATION_PERCENT,'</td>', '<td>',TOTAL_LOG_USED_KB,'</td>', '<td>',TOTAL_LOG_AVAILABLE_KB,'</td>', '<td>',TOTAL_LOG_USED_TOP_KB,'</td>', '<td>',DBPARTITIONNUM,'</td>' ||'</tr>' from SYSIBMADM.LOG_UTILIZATION with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_logs">[db_logs]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --Generate logged SQL select '<a name="used_most_log"><li>Generate logged SQL</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select a.DBPARTITIONNUM, a.AGENT_ID, int(a.UOW_LOG_SPACE_USED/1024) as LOG_USED_KB, b.STMT_TEXT from sysibmadm.snapappl a,SYSIBMADM.SNAPSTMT b where a.AGENT_ID=b.AGENT_ID and b.STMT_TEXT not like ''%<_%>%'' order by LOG_USED_KB desc fetch first 10 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>DBPARTITIONNUM</td>', '<td>AGENT_ID</td>', '<td>LOG_USED_KB</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',a.DBPARTITIONNUM,'</td>', '<td>',a.AGENT_ID,'</td>', '<td>',int(a.UOW_LOG_SPACE_USED/1024) as LOG_USED_KB,'</td>', '<td>',b.STMT_TEXT,'</td>' ||'</tr>' from sysibmadm.snapappl a,SYSIBMADM.SNAPSTMT b where a.AGENT_ID=b.AGENT_ID and b.STMT_TEXT not like '%<_%>%' order by LOG_USED_KB desc fetch first 10 rows only with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_logs">[db_logs]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --holding long time active log select '<a name="long_time_log"><li>HOLDING LONG TIME ACTIVE LOG</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select ap.agent_id, substr(ai.appl_status,1,20) as appl_status, substr(ai.primary_auth_id,1,10) as primary_auth_id, substr(ai.appl_name,1,15) as appl_name, int(ap.UOW_LOG_SPACE_USED/1024) as UOW_LOG_SPACE_USED_KB, int(ap.appl_idle_time/60) as appl_idle_time_min, ap.appl_con_time, st.STMT_TEXT from sysibmadm.snapdb db,sysibmadm.snapappl ap,sysibmadm.snapappl_info ai,sysibmadm.SNAPSTMT st where ai.agent_id=db.APPL_ID_OLDEST_XACT and ai.agent_id=st.AGENT_ID and ap.agent_id=ai.agent_id order by ap.appl_con_time fetch first 30 rows only with ur </code><br>' from sysibm.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from sysibm.SYSDUMMY1 with ur; select '<tr>'|| '<td>AGENT_ID</td>', '<td>APPL_STATUS</td>', '<td>PRIMARY_AUTH_ID</td>', '<td>APPL_NAME</td>', '<td>UOW_LOG_SPACE_USED_KB</td>', '<td>APPL_IDLE_TIME_MIN</td>', '<td>APPL_CON_TIME</td>', '<td>STMT_TEXT</td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',ap.agent_id,'</td>', '<td>',substr(ai.appl_status,1,20) as appl_status,'</td>', '<td>',substr(ai.primary_auth_id,1,10) as primary_auth_id,'</td>', '<td>',substr(ai.appl_name,1,15) as appl_name,'</td>', '<td>',int(ap.UOW_LOG_SPACE_USED/1024) as UOW_LOG_SPACE_USED_KB,'</td>', '<td>',int(ap.appl_idle_time/60) as appl_idle_time_min,'</td>', '<td>',ap.appl_con_time,'</td>', '<td>',st.STMT_TEXT,'</td>' ||'</tr>' from sysibmadm.snapdb db,sysibmadm.snapappl ap,sysibmadm.snapappl_info ai,sysibmadm.SNAPSTMT st where ai.agent_id=db.APPL_ID_OLDEST_XACT and ai.agent_id=st.AGENT_ID and ap.agent_id=ai.agent_id order by ap.appl_con_time fetch first 30 rows only with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_logs">[db_logs]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; --ERROR LOG select '<a name="last_24_hours_log"><li>ERROR LOG</li></a>' from sysibm.SYSDUMMY1 with ur; select '<code> select TIMESTAMP, TIMEZONE, INSTANCENAME, DBPARTITIONNUM, DBNAME, PID, PROCESSNAME, TID, APPL_ID, COMPONENT, FUNCTION, PROBE, MSGNUM, MSGTYPE, MSGSEVERITY, MSG, MEMBER from sysibmadm.PDLOGMSGS_LAST24HOURS order by TIMESTAMP desc fetch first 50 rows only with ur </code><br>' from SYSIBM.SYSDUMMY1 with ur; select '<table border="1" style="background:#C7C7E2" cellspacing="0">' from SYSIBM.SYSDUMMY1 with ur; select '<tr>'|| '<td>TIMESTAMP </td>', '<td>TIMEZONE </td>', '<td>INSTANCENAME </td>', '<td>DBPARTITIONNUM </td>', '<td>DBNAME </td>', '<td>PID </td>', '<td>PROCESSNAME </td>', '<td>TID </td>', '<td>APPL_ID </td>', '<td>COMPONENT </td>', '<td>FUNCTION </td>', '<td>PROBE </td>', '<td>MSGNUM </td>', '<td>MSGTYPE </td>', '<td>MSGSEVERITY </td>', '<td>MSG </td>', '<td>MEMBER </td>' ||'</tr>' from sysibm.SYSDUMMY1 with ur; select '<tr style="background:white">'|| '<td>',TIMESTAMP ,'</td>', '<td>',TIMEZONE ,'</td>', '<td>',INSTANCENAME ,'</td>', '<td>',DBPARTITIONNUM ,'</td>', '<td>',DBNAME ,'</td>', '<td>',PID ,'</td>', '<td>',PROCESSNAME ,'</td>', '<td>',TID ,'</td>', '<td>',APPL_ID ,'</td>', '<td>',COMPONENT ,'</td>', '<td>',FUNCTION ,'</td>', '<td>',PROBE ,'</td>', '<td>',MSGNUM ,'</td>', '<td>',MSGTYPE ,'</td>', '<td>',MSGSEVERITY ,'</td>', '<td>',MSG ,'</td>', '<td>',MEMBER ,'</td>' ||'</tr>' from sysibmadm.PDLOGMSGS_LAST24HOURS order by TIMESTAMP desc fetch first 50 rows only with ur; select '</table>' from sysibm.SYSDUMMY1; select '<a href="#db_logs">[db_logs]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<a href="#TOP">[top]</code><br>' from sysibm.SYSDUMMY1 with ur; select '<br>' from sysibm.SYSDUMMY1 with ur; select '<hr></hr>' from sysibm.SYSDUMMY1 with ur;查看脚本内容
PS:此脚本写的有些匆忙,脚本中的一些指标英文命名不是很规范,可以根据自己需求进行更改。