Scripts and commands for Db2

You can use database scripts and commands to manage your DB2® database.

You can perform the following tasks with the database management scripts and commands for Db2:

Scripts for Db2

analyze_schema.sh
Updates the statistics and receives a report indicating indexes that need reorganization.
drop_temp_agg_tables.pl
A bash script that drops temporary aggregate tables.
drop_log_tables_seq.pl
A bash shell script that drops all of your temporary tables that start with TCTG_ULE_USER_LOG_ENTRY and associated temporary sequences in your database to restore storage space. Starts CLI and SQL for Db2.
ddl_pfm_performance.sql
Drops and re-creates the performance tables.
idx_pfm_performance.sql
Drops and re-creates the indexes on the performance tables.
sysinfo.sql
Collects configuration details for the database.

Commands for Db2

Db2 reorgchk
Updates your statistics information to your Db2 database and checks for reorganization need at the same time.
Db2 reorg
Reorganizes specific tables.
select count(*) from tctg_ita_item_attributes where ita_next_version_id = 999999999 and ita_company_id = company_ID;
Counts the number of rows in a database table that belong to the latest object version.
select count(*) from tctg_ita_item_attributes where ita_next_version_id = 999999999 and ita_company_id = company_ID;
Count the total number of rows in a database table that belong to old object versions.
select * from cmp
Retrieves the CompanyID from the CMP table.
select * from ctg
Retrieves the CatalogID from the CTG table.