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 > How to view alternate server name/IP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-03-11, 05:25
arunmahendran arunmahendran is offline
Registered User
 
Join Date: Sep 2011
Posts: 22
How to view alternate server name/IP

How can we see the alernate server name/IP set during HADR configuration,
using "db2 update alternate server for database <db_name> using hostname <standby public NIC IP> port <prt no>" command?
Reply With Quote
  #2 (permalink)  
Old 10-03-11, 05:37
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
Database 20 entry:

Database alias = BWPRCSDB
Database name = BWPRCSDB
Local database directory = /home/db2inst1
Database release level = c.00
Comment = BatchWebsphereProcessServer
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname = pdb201.cbss.inet
Alternate server port number = 50001

(0)[db2inst1@plx00006 work]$ db2 list db directory
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 10-03-11, 06:11
arunmahendran arunmahendran is offline
Registered User
 
Join Date: Sep 2011
Posts: 22
Thanks przytula..
Reply With Quote
  #4 (permalink)  
Old 10-03-11, 06:17
arunmahendran arunmahendran is offline
Registered User
 
Join Date: Sep 2011
Posts: 22
Hi.. one more question, do we set the client traffic IP( ip on which client communicates) during HADR configuration.

or any IP on that node which is accessible by client can connect to the database??

do we need to set the port number for on which client communicates??
Reply With Quote
  #5 (permalink)  
Old 10-03-11, 06:24
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
not on server
the client receives this alternate info after first connect
if type4 connection - this alternate info has to be specified as options on the connection string
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #6 (permalink)  
Old 10-03-11, 06:39
arunmahendran arunmahendran is offline
Registered User
 
Join Date: Sep 2011
Posts: 22
In the last question, I haven't asked about the specifically about alternate server ip. My question was, do we need to configure any thing(IP, Port num) on DB2 for the client to communicate to the database?

If no, how does DB2 listen to the port and IP??

Last edited by arunmahendran; 10-03-11 at 06:43.
Reply With Quote
  #7 (permalink)  
Old 10-03-11, 07:30
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
have a look at some doc
TCP/IP worksheet for configuring a client to server connection
there is a chapter for server and client - how to configure for communications (first lesson in db2 course)
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #8 (permalink)  
Old 10-03-11, 09:16
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by arunmahendran View Post
In the last question, I haven't asked about the specifically about alternate server ip. My question was, do we need to configure any thing(IP, Port num) on DB2 for the client to communicate to the database?

If no, how does DB2 listen to the port and IP??
The port number is specified in the database manager (instance) configuration. db2 get dbm cfg. There may be a service name instead of port number, in which case you look in /etc/services to resolve (or Windows equivalent).
__________________
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
  #9 (permalink)  
Old 04-19-12, 14:39
dzanter dzanter is offline
Registered User
 
Join Date: Apr 2012
Posts: 1
Via JDBC?

Does Anyone know is there a way to get that Alternate server and port from within JDBC 4 connection?

Quote:
Originally Posted by przytula_guy View Post
Database 20 entry:

Database alias = BWPRCSDB
Database name = BWPRCSDB
Local database directory = /home/db2inst1
Database release level = c.00
Comment = BatchWebsphereProcessServer
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname = pdb201.cbss.inet
Alternate server port number = 50001

(0)[db2inst1@plx00006 work]$ db2 list db directory
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