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 > Error in trying to drop a db2 database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-16-10, 04:21
plavinio plavinio is offline
Registered User
 
Join Date: Apr 2010
Posts: 2
Error in trying to drop a db2 database

Hi,

I'm facing some issues when trying to drop the database. Command used:

drop database "AAB"

The following error occurred.

SQL1013N the database alias name or database name "AAB " could not be found. SQLSTATE=42705

I do not know why database name "AAB " has spaces in between it. It should be created as "AAB". Can anyone advise if the syntax and command to drop database with spaces in between it?

Best Regards,
plavinio
Reply With Quote
  #2 (permalink)  
Old 04-16-10, 07:41
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
A database name is 8 byte in lengths. So DB2 will pad it with spaces in the message. This is nothing you have to worry about.

The actual questions are:
- is your database catalog in the database directory? if not, you may have to catalog it
- if the database is already cataloged, do the files exist in the file system? if not, just uncatalog the database
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 04-16-10, 15:59
plavinio plavinio is offline
Registered User
 
Join Date: Apr 2010
Posts: 2
Hi Knut,

Thanks for the reply. I have managed to fix the issue by executing the following command.

db2 catalog database AAB
db2 drop database AAB

It works successfully

Best Regards,
Plavinio
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