您可以清除效能側寫資料,以還原 DB2® 資料庫上的可用磁碟空間。
開始之前
您必須先在 IBM® Product Master中取消啟動側寫,然後才能清除效能側寫資料。
程序
- 執行下列指令來關閉系統:
cd $TOP/bin/go
./abort_local.sh
- 執行下列指令,以資料庫使用者身分連接至 DB2 資料庫:
db2 connect to db_Service_Name user db_userName using db_password
其中
db_Service_Name 是
db_url 參數的最後一個值,而
db_userName 和
db_password 是
common.properties 檔案中的個別
db_userName 和
db_password 參數。
- 執行
ddl_pfm_performance.sql SQL 指令,以捨棄並重建效能表格:db2 -tvf $TOP/src/db/schema/gen/ddl_pfm_performance.sql
- 執行
idx_pfm_performance.sql SQL 指令,以捨棄並重建效能表格上的索引:db2 -tvf $TOP/src/db/schema/gen/idx_pfm_performance.sql
- 執行下列指令來收集
runstats :cd $TOP/src/bin/db/
./analyze_schema.sh
- 執行下列指令來重新啟動系統:
cd $TOP/bin/go
./start_local.sh