470,643 Members | 1,374 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,643 developers. It's quick & easy.

Howto refresh cataloged database?


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

Nov 15 '06 #1
3 41867
Please try "db2 terminate " after you execute catalog and uncatalog
statement.

Cheers
Prakash Gautam

Lennart wrote:
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
Nov 16 '06 #2
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:
Please try "db2 terminate " after you execute catalog and uncatalog
statement.

Cheers
Prakash Gautam

Lennart wrote:
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
Nov 20 '06 #3
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:
Please try "db2 terminate " after you execute catalog and uncatalog
statement.

Cheers
Prakash Gautam

Lennart wrote:
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
Nov 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Klemens | last post: by
reply views Thread by Dave Johnson | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.