sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Lennart's Avatar

Howto refresh cataloged database?


Question posted by: Lennart (Guest) on November 15th, 2006 08:15 PM

Assuming the following setup:

Server1 running DB2 V8.2 with two databases DB_1 and DB_2:

db2 catalog db DB_1 as CURR_DB

Server2 DB2 runtime client:

db2 catalog tcpip node S1 remote Server1 ...
db2 catalog db CURR_DB at node S1

Now, if I do:

db2 uncatalog db CURR_DB
db2 catalog db DB_2 as CURR_DB

on Server_1, what does it take to get Server_2 to understand that it
should talk to DB_2 instead of DB_1? Forcing all applications does not
seem to help. So far the only way that seems failsafe is to stop/start
db2 on Server_1. This is rather unpractical, since there might be other
databases running in the same instance.

The whole setup is a development environment, and Server_2 is actually
a cluster of appservers. It would be nice if one could recatalog the
database in one place, instead of doing it on all appservers. Any
suggestions welcome.

Thanx in advance
/Lennart

3 Answers Posted
prakash's Avatar
Guest - n/a Posts
#2: Re: Howto refresh cataloged database?

Please try "db2 terminate " after you execute catalog and uncatalog
statement.

Cheers
Prakash Gautam

Lennart wrote:
Quote:
Originally Posted by
Assuming the following setup:
>
Server1 running DB2 V8.2 with two databases DB_1 and DB_2:
>
db2 catalog db DB_1 as CURR_DB
>
Server2 DB2 runtime client:
>
db2 catalog tcpip node S1 remote Server1 ...
db2 catalog db CURR_DB at node S1
>
Now, if I do:
>
db2 uncatalog db CURR_DB
db2 catalog db DB_2 as CURR_DB
>
on Server_1, what does it take to get Server_2 to understand that it
should talk to DB_2 instead of DB_1? Forcing all applications does not
seem to help. So far the only way that seems failsafe is to stop/start
db2 on Server_1. This is rather unpractical, since there might be other
databases running in the same instance.
>
The whole setup is a development environment, and Server_2 is actually
a cluster of appservers. It would be nice if one could recatalog the
database in one place, instead of doing it on all appservers. Any
suggestions welcome.
>
Thanx in advance
/Lennart


m3037836@gmail.com's Avatar
m3037836@gmail.com November 20th, 2006 03:45 PM
Guest - n/a Posts
#3: Re: Howto refresh cataloged database?

Quote from some DB2 manual:
"If directory caching is enabled, database, node, and DCS directory
files are cached in memory. An application's directory cache is created
during its first directory lookup. Since the cache is only refreshed
when the application modifies any of the directory files, directory
changes made by other applications might not be effective until the
application has restarted.

To refresh the CLP's directory cache, use TERMINATE. To refresh DB2's
shared cache, stop (db2stop) and then restart (db2start) the database
manager. To refresh the directory cache for another application, stop
and then restart that application."

The real question is how to refresh DB2's shared cache without stopping
all databases running in the same instance. Any suggestions how to
achieve that?

/Fredrik

prakash wrote:
Quote:
Originally Posted by
Please try "db2 terminate " after you execute catalog and uncatalog
statement.
>
Cheers
Prakash Gautam
>
Lennart wrote:
Quote:
Originally Posted by
Assuming the following setup:

Server1 running DB2 V8.2 with two databases DB_1 and DB_2:

db2 catalog db DB_1 as CURR_DB

Server2 DB2 runtime client:

db2 catalog tcpip node S1 remote Server1 ...
db2 catalog db CURR_DB at node S1

Now, if I do:

db2 uncatalog db CURR_DB
db2 catalog db DB_2 as CURR_DB

on Server_1, what does it take to get Server_2 to understand that it
should talk to DB_2 instead of DB_1? Forcing all applications does not
seem to help. So far the only way that seems failsafe is to stop/start
db2 on Server_1. This is rather unpractical, since there might be other
databases running in the same instance.

The whole setup is a development environment, and Server_2 is actually
a cluster of appservers. It would be nice if one could recatalog the
database in one place, instead of doing it on all appservers. Any
suggestions welcome.

Thanx in advance
/Lennart


m3037836@gmail.com's Avatar
m3037836@gmail.com November 20th, 2006 03:45 PM
Guest - n/a Posts
#4: Re: Howto refresh cataloged database?

Quote from some DB2 manual:
"If directory caching is enabled, database, node, and DCS directory
files are cached in memory. An application's directory cache is created
during its first directory lookup. Since the cache is only refreshed
when the application modifies any of the directory files, directory
changes made by other applications might not be effective until the
application has restarted.

To refresh the CLP's directory cache, use TERMINATE. To refresh DB2's
shared cache, stop (db2stop) and then restart (db2start) the database
manager. To refresh the directory cache for another application, stop
and then restart that application."

The real question is how to refresh DB2's shared cache without stopping
all databases running in the same instance. Any suggestions how to
achieve that?

/Fredrik

prakash wrote:
Quote:
Originally Posted by
Please try "db2 terminate " after you execute catalog and uncatalog
statement.
>
Cheers
Prakash Gautam
>
Lennart wrote:
Quote:
Originally Posted by
Assuming the following setup:

Server1 running DB2 V8.2 with two databases DB_1 and DB_2:

db2 catalog db DB_1 as CURR_DB

Server2 DB2 runtime client:

db2 catalog tcpip node S1 remote Server1 ...
db2 catalog db CURR_DB at node S1

Now, if I do:

db2 uncatalog db CURR_DB
db2 catalog db DB_2 as CURR_DB

on Server_1, what does it take to get Server_2 to understand that it
should talk to DB_2 instead of DB_1? Forcing all applications does not
seem to help. So far the only way that seems failsafe is to stop/start
db2 on Server_1. This is rather unpractical, since there might be other
databases running in the same instance.

The whole setup is a development environment, and Server_2 is actually
a cluster of appservers. It would be nice if one could recatalog the
database in one place, instead of doing it on all appservers. Any
suggestions welcome.

Thanx in advance
/Lennart


 
Not the answer you were looking for? Post your question . . .
197,006 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,006 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors