|
|
|
|
26.1.9.7. Getting an ODBC Trace File
If you encounter difficulties or problems with MyODBC, you
should start by making a log file from the ODBC
Manager (the log you get when requesting logs from
ODBC ADMIN ) and MyODBC.
To get an ODBC trace through Driver Manager, do the following:
-
Open ODBC Data source administrator:
Click Start , point to
Settings , and then click
Control Panel .
-
On computers running Microsoft Windows 2000, XP, or
2003, double-click Administrative
Tools , and then double-click Data
Sources (ODBC) , as shown below.
On computers running an earlier version of Microsoft
Windows, double-click 32-bit ODBC or
ODBC in the Control Panel.
-
The ODBC Data Source Administrator
dialog box appears, as shown below:
Click Help for detailed information about each tab of
the ODBC Data Source Administrator dialog box.
-
Enable the trace option. The procedure for this differs for
Windows and Unix.
To enable the trace option on Windows:
The Tracing tab of the ODBC Data
Source Administrator dialog box enables you to configure
the way ODBC function calls are traced.
When you activate tracing from the
Tracing tab, the Driver
Manager logs all ODBC function calls for all
subsequently run applications.
ODBC function calls from applications running before
tracing is activated are not logged. ODBC function calls
are recorded in a log file you specify.
-
Tracing ceases only after you click Stop
Tracing Now . Remember that while tracing is
on, the log file continues to increase in size and that
tracing affects the performance of all your ODBC
applications.
To enable the trace option on Unix:
-
On Unix, you need to explicitly set the
Trace option in the
ODBC.INI file.
Set the tracing ON or
OFF by using
TraceFile and
Trace parameters in
odbc.ini as shown below:
TraceFile = /tmp/odbc.trace
Trace = 1
TraceFile specifies the name and full
path of the trace file and Trace is
set to ON or OFF .
You can also use 1 or
YES for ON and
0 or NO for
OFF . If you are using
ODBCConfig from
unixODBC , then follow the
instructions for tracing unixODBC
calls at
HOWTO-ODBCConfig.
To generate a MyODBC log, do the following:
-
Ensure that you are using the driver debug DLL (that is,
myodbc3d.dll and not
myodbc3.dll for MyODBC 3.51, and
myodbcd.dll for MyODBC 2.50).
The easiest way to do this is to get
myodbc3d.dll (or
myodbcd.dll ) from the MyODBC 3.51
distribution and copy it over the
myodbc3.dll (or
myodbc.dll ), which is probably in
your C:\windows\system32 or
C:\winnt\system32 directory. Note
that you probably want to restore the old
myodbc.dll file when you have
finished testing, as this is a lot faster than
myodbc3d.dll (or
myodbcd.dll ), so do keep a backup
copy of original DLLs.
Enable the Trace MyODBC option flag
in the MyODBC connect/configure screen. The log is
written to file C:\myodbc.log . If
the trace option is not remembered when you are going
back to the above screen, it means that you are not
using the myodbcd.dll driver (see
above). On Linux or if you are using DSN-Less
connection, then you need to supply
OPTION=4 in the connection string.
-
Start your application and try to get it to fail. Then
check the MyODBC trace file to find out what could be
wrong.
If you find out something is wrong, please send a mail
message to <[email protected]> (or to
<[email protected]> if you have a support
contract from MySQL AB) with a brief description of the
problem, with the following additional information:
MyODBC version
ODBC Driver Manager type and version
MySQL server version
ODBC trace from Driver Manager
MyODBC log file from MyODBC driver
Simple reproducible sample
Remember that the more information you can supply to us, the
more likely it is that we can fix the problem!
Also, before posting the bug, check the MyODBC mailing list
archive at https://lists.mysql.com/.
|
|
|