By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,659 Members | 940 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,659 IT Pros & Developers. It's quick & easy.

The database alias "MONITOR" already exists Can't Not Drop it

P: n/a
Try every thing I know to remove this alias

I know there been other posting I read each one none seem to work.

Thank You
DLWasler
dw*****@yahoo.com

OS Window db2 V 8.2.X

I tried to uncatalog
List doesn't show it

I'm at a major loss here the only thing left is to delete the database
and reinstall it
SQL1005N The database alias "MONITOR" already exists in either
the local database directory or system database directory.

Explanation:

The alias name specified has already been used. If no alias is
specified in the catalog database command, the database name is
used as the alias. When a database is created, the alias name is
the same as the database name.

This error may occur on the catalog database command when the
alias already exists in the system database directory.

On the create database command this error may occur in one of
the following situations:

o The alias already exists in the system database directory and
local database directory.

o The alias already exists in the system database directory but
not in the local database directory.

o The alias already exists in the local database directory but
not in the system database directory.

User Response:

For the catalog database command, uncatalog the alias from the
system database directory and resubmit your original command or
catalog the database with a different alias name.

For the create database command, do the following operations
with respect to the above 3 situations:

o Drop the database using the alias name. Resubmit your
original command.

o Uncatalog the alias. Resubmit your original command.

o Catalog the alias into the system database directory. Drop
the database using the same alias. Resubmit your original
command.

Aug 28 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
dw*****@yahoo.com wrote:
Try every thing I know to remove this alias

I know there been other posting I read each one none seem to work.

OS Window db2 V 8.2.X

I tried to uncatalog
List doesn't show it

I'm at a major loss here the only thing left is to delete the database
and reinstall it
There are two places where DB2 can find information about a database: the
(DB2) database directory (under sqllib/sqldbdir) and the file system
directory where the physical files of the DB2 reside.

In your case, I believe the following happened:
(1) the database was removed from the DB directory using UNCATALOG DB (or
some point'n'click in Control Center or so)
(2) the database files were _not_ removed, i.e. the database was not dropped

When you try an UNCATALOG DB, you get the above error because the database
is not cataloged in the DB directory. When you ren a CREATE DATABASE, DB2
adds it to the DB directory, then goes to the path where the files shall be
created, and finds the files of the previous database with name MONITOR
there.

So what you have to do is to bring DB directory and files back in sync by
(A) cataloging the DB with "CATALOG DB MONITOR", and
(B) dropping the DB if you want to get rid of it completely (DROP DB
MONITOR)

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Aug 29 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.