HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Specifying the node to connect in db2

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
specifyingtheconnectnodedb2

Problem

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

Solution

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

Code Snippets

db2 catalog db DBASE as DBASE1 at node DB2HOST1
db2 catalog db DBASE as DBASE2 at node DB2HOST2

Context

StackExchange Database Administrators Q#30785, answer score: 2

Revisions (0)

No revisions yet.