DB2-z/OS: DB2 Connect 9.1 JDBC Failover for SAP Java stack

[] [] [] [] [] [] [] [] [] [] [] []

Related:

  1. DB2-z/OS: Seamless JDBC Database Failover for SAP Java stackSymptom This SAP Note describes how to enable high availability...
  2. DB2-z/OS: Distribution of Java instances to DB2 membersSymptom If you have configured more than one SAP JAVA...
  3. DB2-z/OS: Running two or more DB2 members on one z/OS LPARSymptom This SAP Note describes how you can set up...
  4. 640PC Edition May 2008:Installation IBM DB2 on z/OSSymptom This SAP Note is valid for the following releases:...
  5. DB2-z/OS: Inconsistent fields with DDIC type RAW/LRAW/VARCSymptom You are requested by a SAP tool or documentation...
  6. DB2-z/OS: PLAN_TABLE & DSN_STATEMNT_TABLE for v9.1Symptom The note describes a fix that allows to create...
  7. DB2/390: HA for unplanned DB outage for java stackSymptom We strongly recommend to use the Db2 Connect V9...
  8. DB2-z/OS: Avoiding automatic recommendations for REORGSymptom With DB2 for z/OS, you can automate the scheduling...

Symptom

This SAP Note describes how to enable high availability for your Java application server in case of unplanned outages of the DB2 for z/OS subsystem if you are running DB2 Connect 9.1. High availability enablement is based on the client reroute feature of the IBM Data Server Driver for JDBC (JCC driver).
If you are running DB2 Connect 9.5 or later, please see note 1085521 for enhanced JDBC database failover capabilities. The failover mechanism described in note 1085521 is the recommended approach.

Other terms

MVS OS/390 HA JAVA Failover z/OS System z DB2

Reason and Prerequisites

Your DB2 subsystem must be running in a data sharing environment.
For releases SAP Web AS 6.40, SAP NetWeaver 7.0 (2004s) and 7.1, the Java stack does not actively support high availability as does the ABAP stack. Therefore, high availability is achieved by exploiting the seamless and cascaded failover feature of the IBM Data Server Driver for JDBC (JCC driver), which reroutes failing connections to a standby member.
The database failover feature of the JDBC driver is independent and works with both the CLI driver and the DB2 Connect gateway.
The following code levels are required for unplanned outages:
APARs for DB2-z/OS V8:
PK35632 DB2 Z/OS SUPPORT FOR JCC CLIENT-REROUTE
PK47633 ALIAS PORT LISTENER IS NOT STARTED UNLESS USING DVIPA
DB2 Connect V9.1 FP3 Special Build 17965

Solution

This section describes the steps that are necessary to enable unplanned failover for JAVA instances with DB2 Connect V9.
You have to define a location alias for the DDF Location and an Alias Port for the DDF Port. The Location Alias must beidenticalfor the primary and secondary members and the alias ports must bedifferent.
The following is an example how you can use the DB2 utility DSNJU003 to specify the DDF settings.
These are sample settings:
//DSNTLOG EXEC PGM=DSNJU003
//*
//STEPLIB DD DISP=SHR,DSN=
//SYSUT1 DD DISP=OLD,DSN=
//SYSUT2 DD DISP=OLD,DSN=
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
DDF LOCATION=DDFDHA,ALIAS=DHAALIAS:8188,
LUNAME=SAPD0001,PORT=8162,RESPORT=8163
Once the DDF is configured correctly, proceed as follows:
1. Stop your Java application server.2. Update your JDBC driver.3. Start the configtool:
Change the URL of the database connection:a) Choose ‘Secure Store’b) Choose key jdbc/pool//Urlc) In the URL, substitute your DDF location with the alias for DDF Location of primary member.d) In the URL, substitute your DDF database port with the alias for DDF port of primary member.e) add the following to the URL:
“clientRerouteAlternateServerName=; clientRerouteAlternatePortNumber= ;
Note that the primary member must be added to clientRerouteAlternateServerName to enable fallback to the primary member.
We assume the following parameters in the following example:
SAPSID JHA
DB2 SSIDs DHA1, DHA2, DHA3
LOCATION DDFDHA
LOCATION ALIAS DHAALIAS
PORT ALIAS 8188,8189,8190
Collection ID (*) SAPJJHADDFDHA
SCHEMA SAPJAVA
HOSTNAME of Primary ha1host
HOSTNAMES of Secondaries ha2host, ha3host
(*) Collection is set to + for NW 7.0 or higher and to SAPDRDA for older NW 6.40 patch collections.
There is no need to change the values for currentPackageSet or currentSQLID to enable high availability for the Java Stack. Also keep the setting keepDynamic=yes.

The resulting url might look like this: “jdbc:db2://ha1host:8188/DHAALIAS:keepDynamic=yes; currentSQLID=SAPJAVA;currentPackageSet=SAPJJHADDFDHA; clientRerouteAlternateServerName=ha1host,ha2host,ha3host; clientRerouteAlternatePortNumber=8162,8189,8190;”
Choose ‘Add’.a) Save your changes in the configtool.1. Restart your Java application server.2. If you run two or more DB2 members of a data sharing group on the same z/OS LPAR, you can proceed as follows to ensure that you can uniquely identify a member:
Use the TCP PORT statement in the z/OS TCPIP profile to assign a different IP address to the DDF address spaces of the DB2 members. It is crucial to assign this IP address to both the SQL port (DSNJU003 option PORT) and Resync port (DSNJU003 option RESPORT) of DDF.
Example: PORT ……
8188 TCP DHA1DIST BIND 192.168.216.201
8188 TCP DHA2DIST BIND 192.168.216.202
Specify the unique IP address in the JDBC connection property clientRerouteAlternateServername.
For details on the TCP PORT statement, see
http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.halz001/portst.htm

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment