Bookmark and Share
RSS

Recent Posts

DB2 12 Session Token Support

May 16, 2017

If you have a client application using Parallel Sysplex workload balancing (WLB), you'll want to take advantage of session token support in DB2 12. But before I get into this new feature, some quick background.

The capability to have a client connection directed to an active data sharing member and then rerouted has been around for some time. It's covered in the IBM Redbook, "DB2 9 for z/OS Data Sharing: Distributed Load Balancing and Fault Tolerant Configuration."

With the introduction of global session variables in DB2 11, any session information, special registers and user-defined session global variables are maintained between the application itself and the current serving location. When using system-directed access, this information must be maintained on DB2 both locally and remotely. Keeping track of this information at the client level can increase the client memory requirements needed to store all the session information, which in turn can lead to performance slowdowns given the large amounts of information that are being passed over the network to the DB2 server to establish the connection. Read more about this in the Redbook, “IBM DB2 11 for z/OS Technical Overview.”

While I haven't confirmed this with anyone involved with the DB2 12 release, it's my belief that session token support is designed to provide relief to these memory and performance issues caused by the introduction of global session variables. Another important factor is that it's required for XA global transactions.

With session token support, session data is maintained on the target DB2 12 for z/OS server. When this feature is enabled, DB2 generates a single small session token (consisting of only a few bytes of data) to represent a client session. A transport is then associated with the session by flowing the appropriate session token on it.

If session token support is not enabled, as in DB2 11, client drivers that use WLB must store and track session information (including global variables, client information and special registers) to support transaction pooling or connection rerouting. With session token support in DB2 12, the DB2 for z/OS server doesn't return session data to the client. Instead, the client using WLB passes a session token to the DB2 server, and DB2 maintains session data for the data sharing group.

These catalog tables are used to manage session data: SYSIBM.SYSSESSION, SYSIBM.SYSSESSION_EX and SYSIBM.SYSSESSION_STATUS.

To activate session token support, the application must be running on DB2 12 with an active function level of V12R1M500 and be sysplex/WLB-enabled. New DB2 Connect client drivers V11.1 FP1 for CLI and Java are also required. This IBM Knowledge Center document has more about common IBM data server driver for JDBC properties.

If you're using session token support, please share your experiences in comments.

Posted May 16, 2017 | Permalink

comments powered by Disqus