Howto refresh cataloged database?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lennart

    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

  • prakash

    #2
    Re: Howto refresh cataloged database?

    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

    Comment

    • m3037836@gmail.com

      #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:
      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

      Comment

      • m3037836@gmail.com

        #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:
        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

        Comment

        Working...