If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Problems with restoring database.. help!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-09, 12:51
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
Problems with restoring database.. help!

Hi,

We have an script that runs every night and drops and recreates a database on a server.. I checked today and it doesn't seem like it was able to drop the database, I see this error message in the logs --

SQL1137W The database manager was unable to remove the database path or some
of the containers when dropping database "dbase". Cleanup is required.

I tried to uncatalog, catalog and create the database so I could drop it again but I get this ---

db2 drop database dbase
SQL1031N The database directory cannot be found on the indicated file system.
SQLSTATE=58031


and because of this when i run the restore, I get this --

SQL1005N The database alias "dbase" already exists in either the local
database directory or system database directory. SQLSTATE=00000


How can I make sure that the database is completely dropped? Thank you!!
Reply With Quote
  #2 (permalink)  
Old 11-12-09, 12:53
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You will have to manually clean up the path that the DB resided on.

Andy
Reply With Quote
  #3 (permalink)  
Old 11-12-09, 13:03
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
thank you, i think that worked
Reply With Quote
  #4 (permalink)  
Old 11-12-09, 14:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
You don't really need to drop the database prior to restoring it - RESTORE will overwrite the existing database with the same name.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On