Page tree
Skip to end of metadata
Go to start of metadata

Purpose

The purpose of this article is to provide information on the correct setup method in order to create an ODBC trace file.

Overview

 There are times when an ODBC trace is requested by technical support, or a developer, that needs information
involving the data that is being passed through the ODBC Driver to the Database Server.  Setting the
ODBC tracing on through the Microsoft ODBC Administrator sometimes will not create the ODBC Trace file.
There are steps that an be followed to ensure a trace file is created.

Details

This is for all current versions of Microsoft Windows.
This is for all Windows versions of Sybase ODBC.

  • Setup ODBC Trace:

Bring up the ODBC Administrator:
Select the  Tracing tab on the left hand side and look in the 'Log File Path'.
Do nothing on the right hand side.  What is listed (odbctrac.dll) is the Microsoft ODBC trace dll
In the 'Log File Path', modify the path (absolute path) to the destination you want the log file to be created.
Also provide a log file name.

 

Select the Apply button on the bottom of the page.
Now select the OK button on the bottom of the page and close out of the Administrator.
Closing out of the ODBC Administrator seems to be the step that saves the information
that was entered into the 'Log File Path'

Reopen the ODBC Administrator.
Select the Tracing tab.
Select the 'Start Tracing Now' button.

At this point, run the application normally.
Once you have reproduced the problem (error) stop the application.
Go back to the ODBC Administrator and select the 'Stop Tracing Now' button.

Close out of the ODBC Administrator.
Close out of the application.
Go to the location of the ODBC trace log.
You can open the log with Microsoft Word and read the log for information
regarding the error and the information that was sent before the error was generated.

  • An example of what the trace will look like:

ODBCTE32        2c90-2e10 ENTER SQLExecDirect
  HSTMT               0x00629720
  UCHAR *             0x0029BDA8 [      -3] "Select * from testdd..sales\ 0"
  SDWORD                    -3

ODBCTE32        2c90-2e10 EXIT  SQLExecDirect  with return code -1 (SQL_ERROR)
  HSTMT               0x00629720
  UCHAR *             0x0029BDA8 [      -3] "Select * from testdd..sales\ 0"
  SDWORD                    -3

  DIAG [42000] [Sybase][ODBC Driver][Adaptive Server Enterprise]testdd..sales not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).
 (208)

Related Content

Related Documents

Related SAP Notes/KBA's

  • No labels