Created On:  16 March 2011


SQL code returns 0 in your COBOL program but nothing is commited in the database when using an ODBC driver (e.g. Oracle).  How can I setup tracing?


You could setup a Windows ODBC Trace by following these steps, then review the trace file to see if that provides any more detailed infromation on what is/if anything is going wrong:

1. Open the ODBC Data Source Administrator tool:
 choose Start > Settings > Control Panel > Administrative Tools > Data Sources.

2. Click the Tracing tab at the top of the ODBC Administrator.

3. You can specify the name of the log file in the Log File Path text box along with the full path (for example: C:\logs\ODBC.log).

4. Click Start Tracing Now to enable tracing.
Now you will notice that the button has now changed to Stop Tracing Now

5. Click the Apply button followed by the OK button until you exit the ODBC Administrator.
All ODBC calls will now be logged to the specified log file.

6. Try to rec reate the issue you are experiencing as you described in your incident.

7. Repeat the steps to stop the tracing and upload the trace file to the incident for our review.