Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Angry Unanswered: Another problen in dropping databases


    I am having difficulty dropping a database in our DB2 7.3 EE installation (running on top of a Windows 2000 Advanced Server). The methods described in the following threads do not work although my problem is the same:

    Here is a background of our installation in hopes that it would help in diagnosing our problem:

    We installed the DB2 on the W2K advanced server but it failed the first time so we had to reinstall it over the failed installation since there was no uninstall options available from the failed one. We had troubles creating and accessing databases in the DB2 instance (I think this has something to do with inexperience but I cant really remember why we cant do it then) so we created the databases under the DB2CTLSV instance. Before I forgot, my teammate recreated it because he deleted it before. Whe he tried creating a new instance it was the name that was preconfigured so he used it.

    Basically we then were able to use the DB2 databases in the DB2CTLSV instance but the instance crashes whenever it comes under heavy load (two simultaneous pull operations from our product application which heavily taxes the db). The workaround I implemented is for the service to restart if it dies but this is not an elegant solution since a pull operation will have to start again once the database connection is lost not to mention the application needs to be restarted also.

    Now I noticed that the test databases in the DB2 instance do no exhibit this error so I am transferring the databases from DB2CTLSV to the DB2 instance. I created a backup of the R321 database using the "backup database..." command and dropped the R321 database from the DB2 control center.

    When I was restoring the database while being attached to the DB2 instance, I got the "SQL1005N The database alias R321 already exists in either the local database directory or system database directory" error and thus the search through the links I posted above. If I recatalog the database using the "catalog database R321 on D:" then the database shows up under the DB2 instance. However, when I am attached to the DB2 instance, dropping the database R321 produces an error that the command needs to be executed while attached to the DB2CTLSV instance. This cycle of dropping, catalouging, uncatalouging just repeats and I really need to move the database while still retaining the names.

    Another thought running through my head is to delete the D:\DB2CTLSV folder and just restore the databases afterwards. What would be the repercussions of this approach?

    thank you.

  2. #2
    Join Date
    Aug 2001
    db2 backup database r321 to c:
    db2 restore database r321 ...blah ... blah ... REDIRECT

    The redirect option may be required if you have created additional containers on other devices ... If you have just used the default userspace1 , then you do not have to do the redirected restore .... For redirected restore scripts, visit and search for 'redirected restore' ...

    In windows, DB2INSTANCE is the environmen variable which indicates the default instance ...


    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