Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Unanswered: 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

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •