To enable unixODBC tracing, add the following section to your odbcinst.ini file. To locate odbcinst.ini, type
odbcinst -j. (If you are using the version of unixODBC that is included in Easysoft ODBC driver distributions, by default, odbcinst is in the /usr/local/easysoft/unixODBC/bin directory.) Note that the permissions on odbcinst.ini may make it necessary for you to be the root user to make changes.
# To enable unixODBC tracing, add this section to odbcinst.ini. # Include the [ODBC] section heading. [ODBC] Trace = yes TraceFile = trace_file_path
where trace_file_path is the path of the file you want log entries to be written to. For example, /tmp/sql.log. If the file does not exist, the driver manager will create it.
Note that running ODBC applications as different users may affect tracing. This is because most users will set their umask in a way that prevents other users from writing to newly created files. For example, user A enables tracing and connects to the driver manager, creating a new trace file. When user B uses the driver manager, it is likely nothing will be traced because user B does not have write permission to the trace file.
As tracing will slow your application down, remember to turn tracing off when you have finished debugging. To do this, either remove the previous lines from your odbcinst.ini file or make the following change:
Trace = no
For information about the format of trace file entries, see the Linux/UNIX ODBC article.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.