Purging performance profiling data in Db2

You can purge your performance profiling data to restore free disk space on your Db2® database.

Before you begin

Before you can purge your performance profiling data, you must deactivate profiling in IBM® Product Master.

Procedure

  1. Shut down your system by running the following commands:
    cd $TOP/bin/go
    ./abort_local.sh
    
  2. Connect to the Db2 database as the DB user by running the following command:
    db2 connect to db_Service_Name user db_userName using db_password
    Where db_Service_Name is the last value of the db_url parameter, and db_userName and db_password are the respective db_userName and db_password parameters that are in the common.properties file.
  3. Drop and re-create the performance tables by running the ddl_pfm_performance.sql SQL command:
    db2 -tvf $TOP/src/db/schema/gen/ddl_pfm_performance.sql
  4. Drop and re-create the indexes on the performance tables by running the idx_pfm_performance.sql SQL command:
    db2 -tvf $TOP/src/db/schema/gen/idx_pfm_performance.sql
  5. Collect your runstats by running the following commands:
    cd $TOP/src/bin/db/
    ./analyze_schema.sh
    
  6. Restart the system by running the following commands:
    cd $TOP/bin/go
    ./start_local.sh