Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    4

    Unanswered: Deleting Databases

    I need to completely delete a database from a DB2 8.1 install.

    The database was a failed DB2 restore, when running the abort command for the restore, it failed. Trying to drop the database returned an error.

    So I deleted the actual files for the database. but it still existed when running db2 list db directory. So I uncataloged it. But when trying to start again I end up with a message about the db being in the local directory. So I cataloged it again and tryed the drop command again. But still no luck - now I get a

    SQL1036C An I/O error occurred while accessing the database. SQLSTATE=58030

    Any ideas,

    All I want to do is get rid of this damn database!!!!

  2. #2
    Join Date
    Jul 2002
    Location
    ATL
    Posts
    170

    Re: Deleting Databases

    Try to Uncatalog the database you are trying to delete.
    Also go to each directory of the containers of your database and delete them.
    Make sure you cleaned up all the containers of all your tablespaces.Even if one container exist the restore will fail.

    Good Luck

    Originally posted by deastley
    I need to completely delete a database from a DB2 8.1 install.

    The database was a failed DB2 restore, when running the abort command for the restore, it failed. Trying to drop the database returned an error.

    So I deleted the actual files for the database. but it still existed when running db2 list db directory. So I uncataloged it. But when trying to start again I end up with a message about the db being in the local directory. So I cataloged it again and tryed the drop command again. But still no luck - now I get a

    SQL1036C An I/O error occurred while accessing the database. SQLSTATE=58030

    Any ideas,

    All I want to do is get rid of this damn database!!!!

  3. #3
    Join Date
    Oct 2003
    Posts
    4
    yup done all that.

    Now I'm left with the database listed in:

    db2 list db directory on /home/db2inst1

    and not in

    db2 list db directory


    any ideas how to get rid of it from the local database directory?

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    catalog database <dbname> on /home/db2inst1

    drop database <dbname>

    This will help you to elegantly drop the databases ..

    If you want to delete the files manually,

    delete the directory structure under /home/db2inst1/db2inst1

    But, remember you still will have stuff hanging around various places (for eg. /var/db2 ) ... Hence the best approach is to go the db2 way to get rid of the databases and instances

    Sathyaram

    Originally posted by deastley
    yup done all that.

    Now I'm left with the database listed in:

    db2 list db directory on /home/db2inst1

    and not in

    db2 list db directory


    any ideas how to get rid of it from the local database directory?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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