Skip to main content

This article explains how to connect an Entperiser Server application to DB2 using user credentials.

Problem:

Enterprise Server is configured to create an XA connection to a DB2 database. In the XA connection string a database name, userid, and password are provided. This userid and password is then used for every database connection established by any program running on that Enterprise Server instance which connects to the database specified in the XA connection string. This means that the database sees every request as coming from the same user. How can individual users be recognized?

Resolution:

The following are two possible solutions:


  1. COBOL running under Enterprise Server runs as application managed, and is passed the userid/password as a parameter. The COBOL code then has to do its own connects/disconnects.
  2. COBOL running under Enterprise Server runs as container managed, and uses IBM's trusted connection environment. In this case, the XA switch module logs in as a super user of sorts, then the COBOL code that is run receives either a userid or userid/password argument and switches to that user as per IBM's "trusted connections".
Note: See related links to IBM's websites regarding this issue.

Incident Number: 2188898

Old KB# 14503

#MFDS
#EnterpriseDeveloper