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 > Delete Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-05, 04:03
anwyuta anwyuta is offline
Registered User
 
Join Date: Sep 2004
Posts: 24
Delete Database

Hi,

i try to create some DB´s with sample-content.

The Problem is, that the Database existed with the same name (and alias)
before.

Depending to an application i have to create these DB´s with the same name and alias.

How can i delete the Databases out of the System- locale-Databasedirectory?`

I tryed uncatalog but it seems that the DB-Alias is still registered ?

Can anyone help plaese?

Thanks in advance.

anwy
Reply With Quote
  #2 (permalink)  
Old 11-29-05, 06:06
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
drop db

you can always drop a db : db2 drop database xxx
db2 list db directory
db2 catalog db xxx as yyyy on /path/
if you uncatalog - always execute db2 terminate (will also flush some resident setting/memory...)
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 11-29-05, 07:43
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Which catalog is it in?

1) LIST DATABASE DIRECTORY
2) LIST DATABASE DIRECTORY ON /path

(replace "/path" with your path)

If the database exists in (2) but not (1), catalog and drop.

If the database exists in (1) but not (2) (ie. you deleted the directory) then simply uncatalog.

If you're still having problems, post the entire error message and output of the LIST DATABASE DIRECTORY commands please.
__________________
--
Jonathan Petruk
DB2 Database Consultant
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