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 > Removing local DB2 databases

LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Registered User
Join Date: Jan 2005
Posts: 1
Removing local DB2 databases

I work in a shop that primarily uses Oracle databases. We use DB2 for our local databases for J2EE unit tests. Each project requires a new database.

While creating a database, DB2 was interrupted. I was unable to create the table space, and wanted to delete the database. I chose "delete" in the control center, and now I understand I should have chosen "drop" first. As a result, I cannot create using the same database name (instance already exists), and I cannot proceed with table space, tables etc (instance does not exist).

One person suggested locating a utility that would clean up the entry table. I have not found the utility, or any information on this problem.

I finally abandoned the database, and created a new one with another name.

I'd like to clean up my workstation.

What is the proper way to remove a DB2 database, and do I have any recourse on the messed up one? My only idea is to deinstall DB2 and reinstall, which means I lose several perfectly good databases and all my created data.

Reply With Quote
  #2 (permalink)  
Registered User
Join Date: Jan 2003
Posts: 4,123
I think if you use the "CATALOG DATABASE MyDB on MyPath" command, you can get back the database so that you can then DROP it. Use the Command Reference for the complete command.


Reply With Quote
  #3 (permalink)  
Registered User
Join Date: Jan 2005
Posts: 191
Did the create database on path work for you?

If not, and you are on V7 (because I only have V8 CC, which doesn't have a database DELETE, so I'm not sure exactly what you did), it might be that DELETE doesn't delete the database, but deletes the local catalog entry for the database. The database is still there - you just can't see it. If you right click on Databases and select Add.. you can recatalog the database, and then DROP it.
Reply With Quote

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