Friends,
[ DB2 v9.5.5 on Win2K3 ]
While restoring backups to Mirrors, I have been dropping the target DB before restoring new copy overnight. Our Mirror servers host 2 DBs in one instance. So I need to force applications selectively to keep other DB intact while restorin the one.
I use following logic to Drop DB
Code:
CONNECT TO GAMING
Database Connection Information
Database server = DB2/NT64 9.5.4
SQL authorization ID = RESTORE
Local database alias = GAMING
Sat 12/18/2010- 2:15:29.66-0
QUIESCE DB IMMEDIATE FORCE CONNECTIONS
DB20000I The QUIESCE DATABASE command completed successfully.
Sat 12/18/2010- 2:15:30.00-0
UNQUIESCE DB
DB20000I The UNQUIESCE DATABASE command completed successfully.
Sat 12/18/2010- 2:15:30.23-0
CONNECT RESET
DB20000I The SQL command completed successfully.
Sat 12/18/2010- 2:15:30.47-0
DEACTIVATE DB GAMING
DB20000I The DEACTIVATE DATABASE command completed successfully.
Sat 12/18/2010- 2:15:39.33-0
DROP DB GAMING
SQL1137W The database manager was unable to remove the database path or some
of the containers when dropping database "GAMING". Cleanup is required.
Sat 12/18/2010- 2:15:41.50-4
===================================
Sat 12/18/2010- 2:15:41.50-4---Drop DB Fail
Sat 12/18/2010- 2:16:00.51-0---ReTry Drop DB
===================================
CONNECT TO GAMING
SQL1031N The database directory cannot be found on the indicated file system.
SQLSTATE=58031
But recently the I have come across the issue above. Seems that some application is holding some files related to GAMING at system level.
Can some one suggest me a better way to DROP DB before RESTOREing.
Or Can I do REPLACE EXISTING without dropping GAMING ??
Regards
Sarbjit Singh Gill