UdaWikiWeb.GeneratingClientsideODBCTracesAllDrivers
Generating Clientside ODBC Traces (All Drivers)
From the Tracing Tab of the
Figure: 1.
When to trace
Use this option to turn tracing off or on.
For a One-time only trace, the trace is made for the duration of the next connection.
Click the Apply button to make your selection active.
This option corresponds to the Trace and
Custom trace library
Use the Select Library button to browse the machine for a library file that contains the code to intercept the trace output.
This field should generally be left blank.
When setting this parameter, you may use the Browse button to locate the library, or specify it manually.
If specified manually, note that the location must be specified as it would be in a Terminal session.
You may use ~/ as a shortcut to your user Home directory.
This option corresponds to the
Log file path
Specify the complete location of the file to which you wish to write the trace.
You may use the Browse button to locate or create the file, or specify it manually.
If specified manually, note that the location must be specified as it would be in a Terminal session.
You may use ~/ as a shortcut to your user Home directory.
This option corresponds to the
Trace Parameters in Preference Files
When the ODBC tracing parameters are changed, they are saved in the [ODBC] section of the ODBC.preference or odbc.ini file, whichever is active on your system.
The following example shows the settings for a one-time trace to a sql.log on the active user's Desktop.
[ODBC] Trace = 1 TraceAutoStop = 1 TraceDLL = TraceFile = ~/Desktop/sql.log
Once the tracing of a connection is complete, the Trace and
Trace
This parameter corresponds to the When to trace option in the Tracing tab. Set to 1, tracing is on; set to 0, tracing is off.
This parameter corresponds to the One-time only option in the tracing tab.
Set to 1, tracing will automatically stop after the next connection is closed; set to 0, tracing must be manually stopped.
When tracing is automatically stopped, the Driver Manager will set both Trace and
This parameter corresponds to the Custom trace library option in the tracing tab. When setting this parameter, note that the file must be fully specified as it would be in a Terminal session. You may use ~/ as a shortcut to your user Home directory.
This parameter corresponds to the Log file path option in the tracing tab. When setting this parameter, note that the file must be fully specified as it would be in a Terminal session. You may use ~/ as a shortcut to your user Home directory.
As of iODBC 3.51.0, there are now more variables that may be included in the filename:
$P
This is the process-id (pid) of the application invoking the driver manager - allowing for per-process log-files
$U
This is the user-id under which the process is currently running
$T
This is the timestamp in
$H
This is the home-directory of the user as whom the process is running
These options are case-insensitive.
Hence you can specify