IBM Support

ODBC tracing on Windows creates no file or empty file for Federation Server

Troubleshooting


Problem

When attempting to get an ODBC trace for Federation Server on a Windows sometimes creates an empty trace file. The DB2 application may slow down as if tracing, but nothing is written to the ODBC trace file.

Cause

Here are several things that can cause this behavior:

1. The DB2 instance is not restarted after tracing is turned on.
2. The tracing entry is not being entered properly in the registry.
3. The DB2 service is running as a different user than the machine owner.
4. The ODBC trace file path set in the ODBC Administrator is ignored and the log file is created somewhere else.
5. Connecting through ODBC to a 3rd party database.

Resolving The Problem

Here are the solutions for all above causes:

1. The DB2 instance needs to be restarted after tracing is turned on.

Stop the DB2 instance(db2stop) turn on tracing in the ODBC Administrator, restart the instance(db2start), then attempt the ODBC trace.

2. The tracing entry is not being entered properly in the registry.

Edit the registry entries HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.ini\ODBC\Trace and HKEY_CURRENT_USER\Software\ODBC\ODBC.ini\ODBC\Trace as detailed in the document at http://support.microsoft.com/kb/274551/en-us. It may be necessary to reboot the machine afterwards. Then, start the service and attempt the ODBC trace.

3. The DB2 service is running as a different user than the machine owner.

Open Services in control panel and right-click on the DB2 service. On the "Log On" tab, select "This Account", provide the machine owner and password and save it. Then, turn on tracing in the ODBC Administrator, restart the DB2 instance and attempt the ODBC trace.

4. The ODBC trace file path set in the ODBC Administrator is ignored and the log file is created somewhere else.

Check C:\Windows\temp to see if there is a new sql.log file there.

5. Server connecting through ODBC to a 3rd party database.

Before tracing is enabled check the box marked "Machine-Wide tracing for all user identities" which is located just below the "Start Tracing Now" button.

[{"Product":{"code":"SS2K5T","label":"InfoSphere Federation Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Data Sources and Wrappers - ODBC","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.5;9.7;10.1;10.5","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
19 February 2020

UID

swg21657202