If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Catalog Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-05, 17:04
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
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
Reply With Quote
  #2 (permalink)  
Old 02-01-05, 17:13
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
CATALOG TCPIP NODE MyNode REMOTE MyHostServer SERVER 50000 REMOTE_INSTANCE db2 SYSTEM MyHostServer OSTYPE WIN;

CATALOG DB AT NODE MyNode AUTHENTICATION SERVER;

Andy
Reply With Quote
  #3 (permalink)  
Old 02-01-05, 17:18
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #4 (permalink)  
Old 02-02-05, 10:29
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
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
Reply With Quote
  #5 (permalink)  
Old 02-02-05, 10:41
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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 10:50.
Reply With Quote
  #6 (permalink)  
Old 02-02-05, 10:46
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
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
Reply With Quote
  #7 (permalink)  
Old 02-02-05, 10:50
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
See my 2nd Post.

Andy
Reply With Quote
  #8 (permalink)  
Old 02-02-05, 11:41
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
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
Reply With Quote
  #9 (permalink)  
Old 02-02-05, 11:47
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Look a little further in the Command Reference for "CATALOG TCPIP NODE".

There are several commands that start "CATALOG".

Andy
Reply With Quote
  #10 (permalink)  
Old 02-02-05, 16:06
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
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
Reply With Quote
  #11 (permalink)  
Old 02-02-05, 19:14
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
May I suggest using db2cfexp MAINTAIN/db2cfimp?

James Campbell
Reply With Quote
  #12 (permalink)  
Old 02-03-05, 10:35
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
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
Reply With Quote
  #13 (permalink)  
Old 02-03-05, 19:07
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
The difference is one of method. YMMV.

James Campbell
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On