Enabling ODBC Trace logs
Lets see how to enable Trace logs for Unix ODBC driver.
Unix ODBC is Open Database connectivity, a Driver Manager.
Using Unix Driver manager you can connect the Database Application to the ODBC Database Driver. In some cases you want to capture the Trace logs of ODBC driver. It is not recommended to keep the Trace logs enabled all the time in the production cluster, this will result in performance issue for the host machine.
You can enable it for debugging purpose and can disable it later.
This is very easy option. place the below option in file called odbcinst.iniDRIVERS and that it. Normally the odbcinst file will be present in /etc/odbcinst.ini or you can get the details by the below command.
[ODBC] Trace = 1 or Trace = yes TraceFile = /path_to_Trace_file_location.out #after making changes in odbcinst.ini file make the directory writeable for all the users chmod 777 /path_to_Trace_file_location.out
Trace option is to enable the logs. Either 1 or yes, enables the Trace log(ON) and 0 or false makes it disabled (OFF).
TraceFile is the file name, where the trace logs needs to be stored. Change the folder to be accessed and writeable by all the user, who ever is using the driver manager. Trace log file will be created it not exist.
Note: Disable the Trace log option after your needs and place this configuration in odbcinst.ini file not in odbc.ini file.