This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
Admin Tip: Name your DB2 Connections
When troubleshooting DB2 problems, it helps to be able to tell quickly what application or client initiated a connection. Although DB2 reports the client's IP or hostname , when using a type 4 JDBC driver the port is unknown. If there are multiple client processes on the same server, matching the DB2 connection to the client can be difficult. In this post, I show how using the clientProgramName JDBC property makes it easy to identify the client, which will save you time.
Using the clientProgramName JDBC property
The clientProgramName JDBC property can be added to the URL format to be printed in the different DB2 reports.
[user@hstp]$ db2 list applications
Auth Id Application Appl. Application Id DB # of
Application handle = 214
Configuring the clientProgramName property with stagingprop
If you use the stagingprop utility, you can set the JDBC property as in this example: "staging.torolab.ibm.com:50000/mall:clientProgramName=stagingprop;"
./stagingprop.sh -dbtype db2 -sourcedb_schema WCS -destdb_schema WCS -scope _all_ -sourcedb "staging.torolab.ibm.com:50000/mall:clientProgramName=stagingprop;" -sourcedb_user db2inst1 -sourcedb_passwd password -destdb "prod.torolab.ibm.com:50000/prod:clientProgramName=stagingprop;" -destdb_user db2inst1 -destdb_passwd password
Configuring the clientProgramName property with the Commerce application (EAR)
Using the WebSphere Administrative Console, clientProgramName can be set as a custom property for the WebSphere Commerce Data Source.
If the data source is defined at the cluster level, all the servers will use the same name. If the definition is at the server level, you can specify different names for each server, such as "WC_prod_JVM1", or you can use other properties such as clientWorkstation. See for more details: