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 > Dropped instance before dropping database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-10, 16:19
mmin mmin is offline
Registered User
 
Join Date: Sep 2009
Posts: 4
Dropped instance before dropping database

I dropped my instance before dropping my database. Now that I've created a new instance I am unable to create a new database with the same name of that existing database. I get an error "the database alias "my_database" already exists in either the local database directory or system database directory".

Is there a way to drop a database that doesnt have an instance?
Reply With Quote
  #2 (permalink)  
Old 03-09-10, 16:50
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,195
If it is in the local database directory, you can uncatalog it.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-10-10, 03:00
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
I think your database is not cataloged at the moment.

So you have two Options.
1.) Removing the files for the database manually (with the risk of missing some files)
2.) Catalog the database in your new instance (CATALOG DATABASE database-name [AS alias] ON <PATH_to_DBdir>) and then drop the database.
Reply With Quote
  #4 (permalink)  
Old 03-10-10, 12:14
mmin mmin is offline
Registered User
 
Join Date: Sep 2009
Posts: 4
Thanks for the replys!

btw: this is DB2 8.1 fixpack 14 on Win 2003 spk 2

I uncataloged the db and attempted to recreate a new one under the new instance with the same name and got the same error. Then I followed nvk@vhv's idea and renamed the tablespace and node physical file directorys with "old" at the end and now I am able to create the new db with the same name as the old one.

Thank you all for your help and solving my issue.
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