Configuring Logging Options
To help troubleshoot issues, you can enable logging in the connector.
You can set the connection properties described below in a connection string, in a DSN (in the odbc.ini
file), or as a connector-wide setting (in the simba.oracleodbc.ini
file). Settings in the connection string take precedence over
settings in the DSN, and settings in the DSN take precedence over connector-wide settings.
To enable logging:
- To specify the level of information to include in log files, set the
LogLevel
property to one of the following numbers:LogLevel Value Description 0
Disables all logging.
1
Logs severe error events that lead the connector to abort.
2
Logs error events that might allow the connector to continue running.
3
Logs events that might result in an error if action is not taken.
4
Logs general information that describes the progress of the connector.
5
Logs detailed information that is useful for debugging the connector.
6
Logs all connector activity.
- Set the
LogPath
key to the full path to the folder where you want to save log files. - Set the
LogFileCount
key to the maximum number of log files to keep.Note: After the maximum number of log files is reached, each time an additional file is created, the connector deletes the oldest log file.
- Set the
LogFileSize
key to the maximum size of each log file in bytes.Note: After the maximum file size is reached, the connector creates a new file and continues logging.
- Optionally, to prefix the log file name with the user name and process ID associated with the connection, set the
UseLogPrefix
property to1
. - Save the
simba.oracleodbc.ini
configuration file. - Restart your ODBC application to make sure that the new settings take effect.
The Simba Oracle ODBC Driver produces the following log files at the location you specify using the LogPath
key:
- A
oracleodbcdriver.log
file that logs connector activity that is not specific to a connection. - A
oracleodbcdriver_connection_[Number].log
file for each connection made to the database, where [Number] is a number that identifies each log file. This file logs connector activity that is specific to the connection.
If you set the UseLogPrefix
property to 1
, then each file name is prefixed with [UserName]_[ProcessID]_
, where [UserName] is the user name associated with the connection and [ProcessID] is the process ID of the application through which the connection is made. For more information, see UseLogPrefix.
To disable logging:
- Set the
LogLevel
key to0
. - Save the
simba.oracleodbc.ini
configuration file. - Restart your ODBC application to make sure that the new settings take effect.