卸載 DB2 後重新安裝,嘗試建立同名資料庫 (如 ASF) 時提示「資料庫已存在」,但控制中心卻看不到該資料庫。
卸載 DB2 實例/產品不會自動刪除資料庫檔案。 資料庫檔案與 DB2 程式檔案分離。若未執行 DROP DATABASE,資料庫目錄仍殘留在檔案系統中,導致重建時衝突。
db2cmd,執行 db2 list db directory 確認資料庫是否仍在目錄中db2 drop database ASF 徹底刪除資料庫檔案與目錄項db2 create database ASF若 list db directory 不見,但檔案仍在磁碟上:
db2 list db directory on <路徑> 掃描指定路徑尋找資料庫db2 catalog database <資料庫名> on <路徑> 重新編目db2 drop database <資料庫名> 刪除DROP DATABASE 才會真正刪除資料庫資料與中繼資料db2idrop)均不刪除資料庫檔案DROP卸載 DB2 前,務必對每個實例執行 db2 drop database <名稱> 清理所有資料庫,再進行實例移除與產品卸載。