Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    4

    Unanswered: Dropped instance before dropping database

    I dropped my instance before dropping my database. Now that I've created a new instance I am unable to create a new database with the same name of that existing database. I get an error "the database alias "my_database" already exists in either the local database directory or system database directory".

    Is there a way to drop a database that doesnt have an instance?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If it is in the local database directory, you can uncatalog it.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jan 2010
    Posts
    335
    I think your database is not cataloged at the moment.

    So you have two Options.
    1.) Removing the files for the database manually (with the risk of missing some files)
    2.) Catalog the database in your new instance (CATALOG DATABASE database-name [AS alias] ON <PATH_to_DBdir>) and then drop the database.

  4. #4
    Join Date
    Sep 2009
    Posts
    4
    Thanks for the replys!

    btw: this is DB2 8.1 fixpack 14 on Win 2003 spk 2

    I uncataloged the db and attempted to recreate a new one under the new instance with the same name and got the same error. Then I followed nvk@vhv's idea and renamed the tablespace and node physical file directorys with "old" at the end and now I am able to create the new db with the same name as the old one.

    Thank you all for your help and solving my issue.

Posting Permissions

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