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 > Drop and Remove database options in DB2 UDB.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Oct 2002
Location: chennai
Posts: 30
Question Drop and Remove database options in DB2 UDB.

Hi all,

I have a problem when i try to drop a database. It gives a message that database in use. But i am very sure that the database which i am planning to drop is not in use by any one because the server resides on my local machine.

I have one more query, can anyone tell me what is the difference between drop and remove database options in db2 udb.
__________________
Thanks,
sekhar rao k
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Location: Zutphen,Netherlands
Posts: 256
Prior to the drop statement you can state a 'force all' statement to do a hard disconnect on all connections like:

db2=> force application all

you should be able do a drop database statement then...
__________________
Ties Blom
Senior Application Developer BI
Getronics Healthcare
DB2,ORACLE,Powercenter,BusObj,Access,
SQL, SQL server
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Location: Zutphen,Netherlands
Posts: 256
Re: Drop and Remove database options in DB2 UDB.

Quote:
Originally posted by k_sekhar_rao


I have one more query, can anyone tell me what is the difference between drop and remove database options in db2 udb.
As far as I can remember the drops really deletes the database, whereas the remove uncatalogs it. It is still there, but not recognized as such........... (could be wrong though on this one)
__________________
Ties Blom
Senior Application Developer BI
Getronics Healthcare
DB2,ORACLE,Powercenter,BusObj,Access,
SQL, SQL server
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Posts: 1,595
Re: Drop and Remove database options in DB2 UDB.

Hi,

DROP - permanently deletes a database (recovery is not posible)
REMOVE - unacatalog database (with Add options you can catalog it back)

Hope this helps,
Grofaty
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Oct 2002
Location: chennai
Posts: 30
Question Re: Drop and Remove database options in DB2 UDB.

Hi,

Thanks for the support.

since i was not able to drop a database, i removed that. can u tell me how to completely drop that database, which i have removed.


Quote:
Originally posted by grofaty
Hi,

DROP - permanently deletes a database (recovery is not posible)
REMOVE - unacatalog database (with Add options you can catalog it back)

Hope this helps,
Grofaty
__________________
Thanks,
sekhar rao k
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Jan 2003
Posts: 1,595
Re: Drop and Remove database options in DB2 UDB.

Hi,

In Control Center click pluses to open Database folder. Then on Database folder click Add and then enter the database name. Select Default drive and press OK. When database apears select right click on database and drop. If you will not be able to drop the database. Then right click and Disconect. Then try drop again.

Hope this helps,
Grofaty

Quote:
Originally posted by k_sekhar_rao
Hi,

Thanks for the support.

since i was not able to drop a database, i removed that. can u tell me how to completely drop that database, which i have removed.
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Jul 2002
Location: ATL
Posts: 170
db2stop kill

Will force all the users out and kills all the db2 process hanging.
This step will ensure that db2 will not be under use of any body

Now execute the drop command.

If this does not help you need to uncatalog the database and manually delete all the containers


Good Luck
Prasad
Reply With Quote
  #8 (permalink)  
Old
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,649
Re: Drop and Remove database options in DB2 UDB.

A very common question ...

Well, since you have uncataloged the database, you will have to catalog it again ...

db2 catalog database <dbname> on Cor whatever your database drive is )

Then issue

db2 drop database <dbname>
and now you should see the database dropped ...

Cheers

Sathyaram

Quote:
Originally posted by k_sekhar_rao
Hi,

Thanks for the support.

since i was not able to drop a database, i removed that. can u tell me how to completely drop that database, which i have removed.
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