The Holy Java

Building the right thing, building it right, fast

Kill a zombie database (not in the directory but can’t create it)

Posted by Jakub Holý on November 2, 2006

I tried to create a database but couldn’t because of “SQL1005N  The database alias “W3IBMDB” already exists in either the local database directory or system database directory.“. I knew I had once such a database, but I thought it existed no more. And indeed “list database directory” didn’t list it. So it was there and it wasn’t there.

It seems that DB2 remembers the old databases if you don’t remove them in the correct way (whatever that is). The steps to fix this were:

  • catalog db w3ibmdb
  • check “list database directory” to verify that it is listed now
  • drop database W3IBMDB
  • create database W3IBMDB                                      — Voila – no more error messages

Sorry, the comment form is closed at this time.

%d bloggers like this: