Unix Technical Forum

system directory and local directory doesn't match for a DB

This is a discussion on system directory and local directory doesn't match for a DB within the DB2 forums, part of the Database Server Software category; --> Dear Group, I recently installed DB2 and created an db "TOOLSDB" for the tools catalog. during installation, the DB ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 03:36 PM
Prince Kumar
 
Posts: n/a
Default system directory and local directory doesn't match for a DB

Dear Group,

I recently installed DB2 and created an db "TOOLSDB" for the tools
catalog. during installation, the DB was created at the default
location. But I moved the DB to another location using
"db2relocatedb". Somehow I messed up during the relocate and undid the
relocate.

Now, I have the following situation.

I can do certain tasks on the DB. but when I try to create a tools
catalog on the toolsdb, I get the following error message.

% db2 create tools catalog toolscat USE EXISTING database toolsdb
SQL1031N The database directory cannot be found on the indicated file
system.
SQLSTATE=58031

Note: I probably can drop and recreate the DB. But I want to try other
alternatives first.

% db2 list db directory

System Database Directory

Number of entries in the directory = 2

Database 1 entry:

Database alias = TOOLSDB
Database name = TOOLSDB
Local database directory = /db2home/db2inst1
Database release level = a.00
Comment = Cataloged by db2relocatedb
Directory entry type = Indirect
Catalog database partition number = 0

Database 2 entry:
....


% db2 list db directory on path /db2home/db2inst1

Database 1 entry:

Database alias = TOOLSDB
Database name = TOOLSDB
Database directory = SQL00001
Database release level = a.00
Comment =
Directory entry type = Home
Catalog database partition number = 0
Database partition number = 0
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 03:36 PM
P. Saint-Jacques
 
Posts: n/a
Default Re: system directory and local directory doesn't match for a DB

I'd try to uncatalog the TOOLSDB first. I think DB2 is confused at the
system and local database directories. Uncatalog, catalog should fix it.
Then catalog the TOOLSDB on the path indicated.
Then try to create it again.

Worse comes to worst, uncatalog, catalog, drop and recreate even if you
say you don't want to do this.
HTH, Pierre.

Prince Kumar wrote:
> Dear Group,
>
> I recently installed DB2 and created an db "TOOLSDB" for the tools
> catalog. during installation, the DB was created at the default
> location. But I moved the DB to another location using
> "db2relocatedb". Somehow I messed up during the relocate and undid the
> relocate.
>
> Now, I have the following situation.
>
> I can do certain tasks on the DB. but when I try to create a tools
> catalog on the toolsdb, I get the following error message.
>
> % db2 create tools catalog toolscat USE EXISTING database toolsdb
> SQL1031N The database directory cannot be found on the indicated file
> system.
> SQLSTATE=58031
>
> Note: I probably can drop and recreate the DB. But I want to try other
> alternatives first.
>
> % db2 list db directory
>
> System Database Directory
>
> Number of entries in the directory = 2
>
> Database 1 entry:
>
> Database alias = TOOLSDB
> Database name = TOOLSDB
> Local database directory = /db2home/db2inst1
> Database release level = a.00
> Comment = Cataloged by db2relocatedb
> Directory entry type = Indirect
> Catalog database partition number = 0
>
> Database 2 entry:
> ...
>
>
> % db2 list db directory on path /db2home/db2inst1
>
> Database 1 entry:
>
> Database alias = TOOLSDB
> Database name = TOOLSDB
> Database directory = SQL00001
> Database release level = a.00
> Comment =
> Directory entry type = Home
> Catalog database partition number = 0
> Database partition number = 0


--
Pierre Saint-Jacques
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 03:36 PM
Prince Kumar
 
Posts: n/a
Default Re: system directory and local directory doesn't match for a DB

Thanks for your Response.

I tried you suggestion. But for somereason, it is not cataoging the DB, now.

$ db2 uncatalog db toolsdb
DB20000I The UNCATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
refreshed.


$ db2 list db directory on /db2home/db2inst1

Local Database Directory on /db2home/db2inst1

Number of entries in the directory = 1

Database 1 entry:

Database alias = TOOLSDB
Database name = TOOLSDB
Database directory = SQL00001
Database release level = a.00
Comment =
Directory entry type = Home
Catalog database partition number = 0
Database partition number = 0


$ db2 catalog db toolsdb on /db2home/db2inst1
SQL6028N Catalog database failed because database "toolsdb" was not found in
the local database directory.


$ db2 catalog db toolsdb
SQL6028N Catalog database failed because database "toolsdb" was not found in
the local database directory.

How do I get rid of this db?

Thanks,
Prince.

"P. Saint-Jacques" <sescons@attglobal.net> wrote in message news:<3F834DD1.4080807@attglobal.net>...
> I'd try to uncatalog the TOOLSDB first. I think DB2 is confused at the
> system and local database directories. Uncatalog, catalog should fix it.
> Then catalog the TOOLSDB on the path indicated.
> Then try to create it again.
>
> Worse comes to worst, uncatalog, catalog, drop and recreate even if you
> say you don't want to do this.
> HTH, Pierre.
>
> Prince Kumar wrote:
> > Dear Group,
> >
> > I recently installed DB2 and created an db "TOOLSDB" for the tools
> > catalog. during installation, the DB was created at the default
> > location. But I moved the DB to another location using
> > "db2relocatedb". Somehow I messed up during the relocate and undid the
> > relocate.
> >
> > Now, I have the following situation.
> >
> > I can do certain tasks on the DB. but when I try to create a tools
> > catalog on the toolsdb, I get the following error message.
> >
> > % db2 create tools catalog toolscat USE EXISTING database toolsdb
> > SQL1031N The database directory cannot be found on the indicated file
> > system.
> > SQLSTATE=58031
> >
> > Note: I probably can drop and recreate the DB. But I want to try other
> > alternatives first.
> >
> > % db2 list db directory
> >
> > System Database Directory
> >
> > Number of entries in the directory = 2
> >
> > Database 1 entry:
> >
> > Database alias = TOOLSDB
> > Database name = TOOLSDB
> > Local database directory = /db2home/db2inst1
> > Database release level = a.00
> > Comment = Cataloged by db2relocatedb
> > Directory entry type = Indirect
> > Catalog database partition number = 0
> >
> > Database 2 entry:
> > ...
> >
> >
> > % db2 list db directory on path /db2home/db2inst1
> >
> > Database 1 entry:
> >
> > Database alias = TOOLSDB
> > Database name = TOOLSDB
> > Database directory = SQL00001
> > Database release level = a.00
> > Comment =
> > Directory entry type = Home
> > Catalog database partition number = 0
> > Database partition number = 0

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 03:37 PM
Lloyd D Budd
 
Posts: n/a
Default Re: system directory and local directory doesn't match for a DB

Hi Prince,

Something seems wrong -- and it is not you ;-). I would try "db2 catalog
db TOOLSDB". I do not think that will make any difference, but worth a
try. If that is not successful, then I would suggest opening a PMR with
DB2 Support -- they will likely what to know the exact steps of your
aborted/failed db move, and request that you try db2trc'ing the catalog
statement.

If that does not interest you, to manually clean up the files, that db
must be the only "local" db. You can then remove all the files under
/db2home/db2inst1/db2inst1/

HTH,
Lloyd
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 03:37 PM
PM \(pm3iinc-nospam\)
 
Posts: n/a
Default Re: system directory and local directory doesn't match for a DB

DB21056W Directory changes may not be effective until the directory cache
is
refreshed.
=
db2 terminate

Try it after your catalog operations.

PM


"Prince Kumar" <gspk@yahoo.com> a écrit dans le message de
news:629275ba.0310081006.33c8c2e5@posting.google.c om...
> Thanks for your Response.
>
> I tried you suggestion. But for somereason, it is not cataoging the DB,

now.
>
> $ db2 uncatalog db toolsdb
> DB20000I The UNCATALOG DATABASE command completed successfully.
> DB21056W Directory changes may not be effective until the directory cache

is
> refreshed.
>
>
> $ db2 list db directory on /db2home/db2inst1
>
> Local Database Directory on /db2home/db2inst1
>
> Number of entries in the directory = 1
>
> Database 1 entry:
>
> Database alias = TOOLSDB
> Database name = TOOLSDB
> Database directory = SQL00001
> Database release level = a.00
> Comment =
> Directory entry type = Home
> Catalog database partition number = 0
> Database partition number = 0
>
>
> $ db2 catalog db toolsdb on /db2home/db2inst1
> SQL6028N Catalog database failed because database "toolsdb" was not found

in
> the local database directory.
>
>
> $ db2 catalog db toolsdb
> SQL6028N Catalog database failed because database "toolsdb" was not found

in
> the local database directory.
>
> How do I get rid of this db?
>
> Thanks,
> Prince.
>
> "P. Saint-Jacques" <sescons@attglobal.net> wrote in message

news:<3F834DD1.4080807@attglobal.net>...
> > I'd try to uncatalog the TOOLSDB first. I think DB2 is confused at the
> > system and local database directories. Uncatalog, catalog should fix it.
> > Then catalog the TOOLSDB on the path indicated.
> > Then try to create it again.
> >
> > Worse comes to worst, uncatalog, catalog, drop and recreate even if you
> > say you don't want to do this.
> > HTH, Pierre.
> >
> > Prince Kumar wrote:
> > > Dear Group,
> > >
> > > I recently installed DB2 and created an db "TOOLSDB" for the tools
> > > catalog. during installation, the DB was created at the default
> > > location. But I moved the DB to another location using
> > > "db2relocatedb". Somehow I messed up during the relocate and undid the
> > > relocate.
> > >
> > > Now, I have the following situation.
> > >
> > > I can do certain tasks on the DB. but when I try to create a tools
> > > catalog on the toolsdb, I get the following error message.
> > >
> > > % db2 create tools catalog toolscat USE EXISTING database toolsdb
> > > SQL1031N The database directory cannot be found on the indicated file
> > > system.
> > > SQLSTATE=58031
> > >
> > > Note: I probably can drop and recreate the DB. But I want to try other
> > > alternatives first.
> > >
> > > % db2 list db directory
> > >
> > > System Database Directory
> > >
> > > Number of entries in the directory = 2
> > >
> > > Database 1 entry:
> > >
> > > Database alias = TOOLSDB
> > > Database name = TOOLSDB
> > > Local database directory = /db2home/db2inst1
> > > Database release level = a.00
> > > Comment = Cataloged by db2relocatedb
> > > Directory entry type = Indirect
> > > Catalog database partition number = 0
> > >
> > > Database 2 entry:
> > > ...
> > >
> > >
> > > % db2 list db directory on path /db2home/db2inst1
> > >
> > > Database 1 entry:
> > >
> > > Database alias = TOOLSDB
> > > Database name = TOOLSDB
> > > Database directory = SQL00001
> > > Database release level = a.00
> > > Comment =
> > > Directory entry type = Home
> > > Catalog database partition number = 0
> > > Database partition number = 0



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com