Discussion:
Not able to delete database.
(too old to reply)
r***@gmail.com
2007-08-08 07:13:32 UTC
Permalink
Hi All,

When I try deleting a database, it says database couldn't be found. Error SQL1013N and SQLSTATE=42705. However, if I list db, it shows the db existence or if i try creating a db with same name, it says db already exit.

My env is : DB2 UDB 8.2.5, AIX 5.3.

Please help.

Regards,
Rakesh Kumar
Knut Stolze
2007-08-08 08:57:28 UTC
Permalink
Post by r***@gmail.com
Hi All,
When I try deleting a database, it says database couldn't be found. Error
SQL1013N and SQLSTATE=42705. However, if I list db, it shows the db
existence or if i try creating a db with same name, it says db already
exit.
Most probably you removed the physical files of the database manually, but
the entry for the database in the database directory still exists. You can
simply uncatalog the database:

db2 uncatalog db <dbname>

This removes the catalog entry, and since the files are already gone, you
can create a new db with that name.
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
r***@gmail.com
2007-09-13 06:41:10 UTC
Permalink
Post by r***@gmail.com
Post by r***@gmail.com
Hi All,
When I try deleting a database, it says database
couldn't be found. Error
Post by r***@gmail.com
SQL1013N and SQLSTATE=42705. However, if I list db,
it shows the db
Post by r***@gmail.com
existence or if i try creating a db with same name,
it says db already
Post by r***@gmail.com
exit.
Most probably you removed the physical files of the
database manually, but
the entry for the database in the database directory
still exists. You can
db2 uncatalog db <dbname>
This removes the catalog entry, and since the files
are already gone, you
can create a new db with that name.
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Thanks for your reply.
r***@gmail.com
2007-09-13 06:41:15 UTC
Permalink
Post by r***@gmail.com
Post by r***@gmail.com
Hi All,
When I try deleting a database, it says database
couldn't be found. Error
Post by r***@gmail.com
SQL1013N and SQLSTATE=42705. However, if I list db,
it shows the db
Post by r***@gmail.com
existence or if i try creating a db with same name,
it says db already
Post by r***@gmail.com
exit.
Most probably you removed the physical files of the
database manually, but
the entry for the database in the database directory
still exists. You can
db2 uncatalog db <dbname>
This removes the catalog entry, and since the files
are already gone, you
can create a new db with that name.
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Thanks for your reply.

Loading...