EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #109 background imageLoading...
Page #109 background image
Examples
Example: Client reroute to a DB2 server when maxRetriesForClientReroute and
retryIntervalForClientReroute are not set: Suppose that the following properties are set
for a connection to a database:
Property Value
enableClientAffinitiesList DB2BaseDataSource.NO (2)
serverName host1
portNumber port1
clientRerouteAlternateServerName host2
clientRerouteAlternatePortNumber port2
The following steps demonstrate a client reroute scenario for a connection to a DB2
for z/OS or DB2 Database for Linux, UNIX, and Windows server:
1. The IBM Data Server Driver for JDBC and SQLJ loads host1:port1 into its
memory as the primary server address, and host2:port2 into its memory as the
alternate server address.
2. On the initial connection, the driver tries to connect to host1:port1.
3. The connection to host1:port1 fails, so the driver tries another connection to
host1:port1.
4. The reconnection to host1:port1 fails, so the driver tries to connect to
host2:port2.
5. The connection to host2:port2 succeeds.
6. The driver retrieves alternate server information that was received from server
host2:port2, and updates its memory with that information.
Assume that the driver receives a server list that contains host2a:port2a,
host2:port2. host2a:port2a is stored as the new primary server, and host2:port2
is stored as the new alternative server. If another communication failure is
detected on this same connection, or on another connection that is created
from the same DataSource, the driver tries to connect to host2a:port2a as the
new primary server. If that connection fails, the driver tries to connect to the
new alternate server host2:port2.
7. A communication failure occurs during the connection to host2:port2.
8. The driver tries to connect to host2a:port2a.
9. The connection to host2a:port2a is successful.
10. The driver retrieves alternate server information that was received from server
host2a:port2a, and updates its memory with that information.
The following steps demonstrate a client reroute scenario for a connection to IBM
Informix Dynamic Server:
1. The IBM Data Server Driver for JDBC and SQLJ tries to connect to the
Connection Manager that is identified by host1:port1.
2. The connection to host1:port1 fails, so the driver tries to connect to the
Connection Manager that is identified by host2:port2.
3. The connection to host2:port2 succeeds.
4. The driver retrieves alternate server information that was received from server
host2:port2, and updates its memory with that information.
Assume that the driver receives a server list that contains host1a:port1a,
host2a:port2a. host1a:port1a is stored as the new primary server, and
Chapter 3. JDBC application programming 93
|
|
|
|
|
||
||
||
||
||
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability