Tuesday, February 19, 2013

Enable SQL Logging for MDM Server Transaction

When ever somethings behave unexpectedly on the MDM side especially when the performance of a trasnaction is bad, we often start thinking about grabbing the sql of a transaction.

There are mutiple ways to do so ,but the easiest one for developers seems to be enabling the Websphere trace logging.

How to do that?

In the Admin console :
Logging and Tracing > server1 > Diagnostic trace service > Change log detail levels

Under Runtime :
*=info: RRA=all: EJBContainer=all: com.ibm.ws.database.*=all: com.ibm.ws.db2.*=all

The above setting will make the JDBC adapter which connects your WAS to the DB2 or any database to log the sqls.

This is totally a WAS config and has nothign to do with MDM.

Please execute one of the MDM transactions.

Look for the trace.log file
It will be located in the log folder of your profile


Open the file and search for "prepareStatement Entry "

Hope this helps!