Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have 2 nodes in my db2 catalog. How would I include the node on which I want to connect inside the db2 connect paramters?

 Node 1 entry:

 Node name                      = DB2HOST1
 Comment                        =
 Directory entry type           = LOCAL
 Protocol                       = TCPIP
 Hostname                       = host1.sample.com
 Service name                   = 60000

 Node 2 entry:

 Node name                      = DB2HOST2
 Comment                        =
 Directory entry type           = LOCAL
 Protocol                       = TCPIP
 Hostname                       = host2.sample.com
 Service name                   = 60000

This is my query:

    db2 connect to DBASE user user1 using password1 <-- works
    db2 connect to DBASE user user1 using password1 node db2host1 <-- doesn't work
share|improve this question
add comment

migrated from stackoverflow.com Dec 19 '12 at 22:47

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

Possibly, you could catalog the databases under a unique alias for each node:

db2 catalog db DBASE as DBASE1 at node DB2HOST1
db2 catalog db DBASE as DBASE2 at node DB2HOST2
share|improve this answer
1  
this is very helpful! Thank you. –  John Santos Dec 19 '12 at 16:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.