Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Logging

This chapter describes how to enable logging when you need to perform troubleshooting. It discusses the following topics:

Caution:

Enable logging only when you need to perform troubleshooting. You should not enable logging during normal operation, because it will dramatically slow down performance.

When using the SQL Gateway (as discussed in “Using the Caché SQL Gateway with ODBC”), be sure to consult the documentation for the remote database to which you are connecting.

Enabling Logging for ODBC on Windows

On Windows, to enable logging for an ODBC data source, you generally use the ODBC Data Source Administrator screen (within the Windows Control Panel). To access this screen, open the Windows Control Panel, open the Administrative Tools subpanel, and then double-click Data Sources (ODBC). Or open the Windows Control Panel and then double-click ODBC Data Sources.

Then do the following:

  • To enable logging for the client driver, find the definition of the DSN that you want to log. Different kinds of DSN are on different tabs. Click the appropriate tab. Look for a check box labeled ODBC Log (or Log or variations) and select it.

  • To enable logging for the driver manager, click the Tracing tab and then click the Start Tracing Now button.

    The Log File Path field determines the location of the trace file.

The details may vary depending on your version of Windows as well as the client driver that you use for this DSN.

Note:

The default location of the CacheODBC.log file varies depending on the version of Windows. For Windows Vista and higher, the log will be created in the Public folder under %PUBLIC%\Logs (default path C:\Users\Public\Logs). This folder is accessible by all users and allows just one location for the log to be created. For earlier versions, the log is under %WINDIR% (the C:\Windows or C:\WinNT folder, depending on your version of Windows).

You can change the name and location of the log file by setting the CACHEODBCTRACEFILE environment variable (see “Caché ODBC Environment Variables”).

Enabling Logging for ODBC on UNIX®

On UNIX®, enable logging for ODBC as follows:

  • To enable logging for the client driver, use the CACHEODBCTRACE environment variable (as described in the chapter “ODBC Environment Variables”). Also configure the ODBC initialization file.

  • To enable logging for the driver manager, set the Trace entry in the ODBC initialization file. In the same file, the TraceFile entry specifies the name of the log file to create. For information on the initialization file, see “Configuring the ODBC Initialization File.”

Tip:

If you enable logging but the log file is not updated, either you might not have privileges to write to the file or the client application may have loaded the DLL before you enabled logging. In the latter case, stop and restart the client application to force it to reload the DLL and get the logging flag.

FeedbackOpens in a new tab