| |
|
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.
|
 |

02-19-03, 02:57
|
|
Registered User
|
|
Join Date: Oct 2002
Location: chennai
Posts: 30
|
|
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
|
|

02-19-03, 05:16
|
|
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
|
|

02-19-03, 05:21
|
|
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
|
|

02-19-03, 06:15
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 1,583
|
|
|
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
|
|

02-19-03, 23:47
|
|
Registered User
|
|
Join Date: Oct 2002
Location: chennai
Posts: 30
|
|
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
|
|

02-20-03, 01:25
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 1,583
|
|
|
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.
|
|
|

02-20-03, 15:09
|
|
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
|
|

02-25-03, 04:49
|
|
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 C  or 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.
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|