docs.intersystems.com
Home  /  Application Development: Language Bindings and Gateways  /  Using ODBC with InterSystems Products  /  InterSystems ODBC Environment Variables


Using ODBC with InterSystems Products
InterSystems ODBC Environment Variables
[Back] 
InterSystems: The power behind what matters   
Search:  


This chapter describes the environment variables that control the InterSystems ODBC client driver. Typically you use these only for debugging or diagnostics.
IRISODBCDEFTIMEOUT
This variable allows you to specify the duration of a timeout for a default login. Its value is in seconds.
IRISODBCPID
This boolean variable enables the automatic appending of the process ID number to the log file name. A value of 1 enables appending and a value of 0 disables it. By default, appending is off.
With IRISODBCPID enabled, if the base log file is IRISODBC.log and is in your current directory, then the process ID of 21933 generates a full log file name of “IRISODBC.log.21933”.
Both IRISODBCPID and IRISODBCTRACEFILE affect the file name. For example, on Windows if you use IRISODBCTRACEFILE to set the base file name of the log file (for instance, to C:/home/mylogs/mylog.txt and enable IRISODBCPID, then log file names will be of the form C:/home/mylogs/mylog.txt.21965.
IRISODBCTRACE (UNIX® Only)
This boolean variable enables client driver logging. The default name for this file is IRISODBC.log.
For more information on logging, see the chapter Logging.”
IRISODBCTRACEFILE
This variable specifies the location and name of the log file. This can be useful for placing the log file in a unique directory or giving it a unique name. The default location of the log file is as follows:
Special Steps for Windows 2003
There are special requirements for setting up the trace file on Windows 2003, specifically for the situation where ODBC is being run by the Web server process. In addition to ensuring that the ODBC client has permission to write to the appropriate logging directory, you need to perform the following procedure:
  1. When specifying the log file information, you also have the option of defining the IRISODBCPID environment variable to include PID information. To do this, create another new variable with a name of IRISODBCPID and a value of 1.
  2. Create the directory C:\ODBC_Logs and grant universal write access to this directory.
  3. Activate ODBC logging by selecting the ODBC Log check box in the DSN setup screen.
IRISODBCTRACETHREADS
This variable controls whether the log also includes threading information. If the variable is 1, threading information is included; if it is 0, threading information is not included.
It can be useful to enable this additional kind of logging, if you need to debug a threaded application. However, it adds many extra lines to the log for most ODBC applications.