Results 1 to 13 of 13
  1. #1
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Unanswered: Catalog Database

    I am runing DB2 on a windows platform. I need to catalog a database on my end users machines after i have installed the run time client. I want to create a script to do this so that i dont have to go to everyones pc. can anyone give me a good example of the catalog comand?
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    CATALOG TCPIP NODE MyNode REMOTE MyHostServer SERVER 50000 REMOTE_INSTANCE db2 SYSTEM MyHostServer OSTYPE WIN;

    CATALOG DB AT NODE MyNode AUTHENTICATION SERVER;

    Andy

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    First do the CATALOG TCP/IP NODE command, then the CATALOG DATABASE command which references the Node you created on the client in the first step. These are described in the Command Reference manual.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Quote Originally Posted by ARWinner
    CATALOG TCPIP NODE MyNode REMOTE MyHostServer SERVER 50000 REMOTE_INSTANCE db2 SYSTEM MyHostServer OSTYPE WIN;

    CATALOG DB AT NODE MyNode AUTHENTICATION SERVER;

    Andy
    IM guessing here:
    Code:
    db2 catalog tcpip node db2_test remote scrbbususcnc05 50000 remote_instance db2 system scrbbususcnc05 ostype win
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need the keyword SERVER before 50000.

    scrbbususcnc05 is your server name. Make sure that it can be resolved (DNS, etc).

    50000 is the port you installed DB2 on the server. 50000 is the default, so if you did not change this value when you installed DB2 on the server this is correct.

    db2 is the instance name you created on the server when you installed and or created the instance. I believe "db2" is the default for Windows.

    Andy
    Last edited by ARWinner; 02-02-05 at 11:50.

  6. #6
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Quote Originally Posted by ARWinner
    You need the keyword SERVER before 50000.

    scrbbususcnc05 is your server name. Make sure that it can be resolved (DNS, etc).

    50000 is the port you installed DB2 on the server. 50000 is the default, so if you changed this value when you installed DB2 on the server this is correct.

    db2 is the instance name you created on the server when you installed and or created the instance. I believe "db2" is the default for Windows.

    Andy

    when i run the code i get the following error
    Code:
    SQL0104N  An unexpected token "50000" was found following "<identifier>".
    Expected tokens may include:  "SERVER".  SQLSTATE=42601
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    See my 2nd Post.

    Andy

  8. #8
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Quote Originally Posted by ARWinner
    CATALOG TCPIP NODE MyNode REMOTE MyHostServer SERVER 50000 REMOTE_INSTANCE db2 SYSTEM MyHostServer OSTYPE WIN;

    CATALOG DB AT NODE MyNode AUTHENTICATION SERVER;

    Andy

    This is the syntax for catalog from the db2 help

    Code:
    Command syntax 
      >>-CATALOG--+-DATABASE-+-- database-name --+-----------+---------->
                '-DB-------'                 '-AS-- alias -'
    
    >--+-------------------+---------------------------------------->
       +-ON--+- path --+-----+
       |     '- drive -'     |
       '-AT NODE-- nodename -'
    
    >--+--------------------------------------------------------------+-->
       '-AUTHENTICATION--+-SERVER-----------------------------------+-'
                         +-CLIENT-----------------------------------+
                         +-SERVER_ENCRYPT---------------------------+
                         +-KERBEROS TARGET PRINCIPAL-- principalname -+
                         +-  7 DATA_ENCRYPT -----------------------------+
                         +-  7 DATA_ENCRYPT_CMP -------------------------+
                         '-  7 GSSPLUGIN --------------------------------'
    
    >--+------------------------+----------------------------------><
       '-WITH-- "comment-string" -'
    I dont see tcpip or remote....I am trying to get this to work...let me see what i cant
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  9. #9
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Look a little further in the Command Reference for "CATALOG TCPIP NODE".

    There are several commands that start "CATALOG".

    Andy

  10. #10
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    And the winner is!!!

    Code:
    db2 catalog tcpip node db2_prod remote scrbbususcnc05 server 50000
    
    db2 catalog db namdwh at node db2_prod authentication server
    Thanks for the help.
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  11. #11
    Join Date
    Jan 2005
    Posts
    191
    May I suggest using db2cfexp MAINTAIN/db2cfimp?

    James Campbell

  12. #12
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Quote Originally Posted by jacampbell
    May I suggest using db2cfexp MAINTAIN/db2cfimp?

    James Campbell

    whats the difference?
    ------------
    And back to SQL Server....I always find my way home
    View my Linkedin profile

  13. #13
    Join Date
    Jan 2005
    Posts
    191
    The difference is one of method. YMMV.

    James Campbell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •