DB2_DRV.INT
The general behavior of the DataFlex DB2 Driver can be configured through the configuration file, DB2_DRV.INT. The configuration file is read when the driver initializes.
Configuration files can be located anywhere in DFPATH. In general, one configuration file per installation is enough. There are situations where there is a need to have different configurations for different deployment environments on one machine/network. In that case, the configuration file should be placed in the deployment environment rather than in the overall DataFlex environment.
The example configuration file (DB2_DRV.INT) is installed in the DataFlex Bin directory.
The keywords will be presented in the following format:
<Keyword>
Value <Possible values>
Associated attribute <Attribute_Name> (<Type>)
Where
<Keyword>: The keyword to set in the intermediate file.<Possible values>: A list of values or a description of possible values for the keyword.<Attribute_Name>: The name of the attribute associated with the keyword.(<Type>): The type of the associated keyword.
Keywords
The supported keywords for the global intermediate file are:
Auto-Reconnect
- Value: 0 or 1
- Associated Attribute: None
- Description: Determines whether the driver attempts to auto-reconnect or not. The default value is 1 (Auto-Reconnect On).
Cache_Path
- Value: Path to a valid directory
- Associated Attribute: DF_DRIVER_CACHE_PATH
- Description: Sets up a directory to store cache files. By default, cache files will be stored in the same directory as the corresponding intermediate file.
Default_Default_ASCII
- Value: Default specification
- Associated Attribute: DF_DRIVER_DEFAULT_DEFAULT_ASCII
- Description: Sets up the default value that will be used when an ASCII field is created. Fields can be created during conversion or within a restructure operation.
Default_Default_Binary
- Value: Default specification
- Associated Attribute: DF_DRIVER_DEFAULT_DEFAULT_BINARY
- Description: Sets up the default value that will be used when a Binary field is created. Fields can be created during conversion or within a restructure operation.
Default_Default_Date
- Value: Default specification
- Associated Attribute: DF_DRIVER_DEFAULT_DEFAULT_DATE
- Description: Sets up the default value that will be used when a Date field is created. Fields can be created during conversion or within a restructure operation.
Default_Default_DateTime
- Value: Default specification
- Associated Attribute: DF_DRIVER_DEFAULT_DEFAULT_DATETIME
- Description: Sets up the default value that will be used when a DateTime field is created. Fields can be created during conversion or within a restructure operation.
Default_Default_Numeric
- Value: Default specification
- Associated Attribute: DF_DRIVER_DEFAULT_DEFAULT_NUMERIC
- Description: Sets up the default value that will be used when a Numeric field is created. Fields can be created during conversion or within a restructure operation.
Default_Default_Text
- Value: Default specification
- Associated Attribute: DF_DRIVER_DEFAULT_DEFAULT_TEXT
- Description: Sets up the default value that will be used when a Text field is created. Fields can be created during conversion or within a restructure operation.
DEFAULT_MAP_DF_TO_SQL_TYPE_SCHEMA
- Value: Integer value
- Associated Attributes: DF_DATABASE_DEFAULT_MAP_DF_TO_SQL_TYPE_SCHEMA, DF_DRIVER_DEFAULT_MAP_DF_TO_SQL_TYPE_SCHEMA
- Description: Determines the default mapping schema setting for all DataFlex types.
Default_Nullable_ASCII
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_NULLABLE_ASCII
- Description: Sets up if ASCII fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero); all other integer values will allow null values.
Default_Nullable_Binary
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_NULLABLE_BINARY
- Description: Sets up if Binary fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero); all other integer values will allow null values.
Default_Nullable_Date
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_NULLABLE_DATE
- Description: Sets up if Date fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero); all other integer values will allow null values.
Default_Nullable_DateTime
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_NULLABLE_DATETIME
- Description: Sets up if DateTime fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero); all other integer values will allow null values.
Default_Nullable_Numeric
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_NULLABLE_NUMERIC
- Description: Sets up if Numeric fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero); all other integer values will allow null values.
Default_Nullable_Text
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_NULLABLE_TEXT
- Description: Sets up if Text fields allow null values by default. Null values are not allowed if the attribute is set to 0 (zero); all other integer values will allow null values.
Default_Record_Identity_Hiding
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_RECORD_IDENTITY_HIDING
- Description: When old definition tables are opened - with a record identity column called
DFRECNUMthat is placed at the end of the record – this attribute determines if the record identity is visible or not. Setting the attribute to a non-zero value will hide every record identity column in every table.
Default_Table_Character_Format
- Value: ANSI, OEM
- Associated Attribute: DF_DRIVER_DEFAULT_TABLE_CHARACTER_FORMAT
- Description: The default table character format to use when creating new tables.
Default_Use_Dummy_Zero_Date
- Value: Integer value
- Associated Attribute: DF_DRIVER_DEFAULT_USE_DUMMY_ZERO_DATE
- Description: Sets up the default value of the
DF_FILE_USE_DUMMY_ZERO_DATEattribute for new tables created in a structure operation. Dummy zero dates will not be used if set to 0; all other integer values will use dummy zero dates.
DfConnectionId
- Value: ID, ConnectString, Options
- Associated Attributes:
- DF_DRIVER_CONNECTION_ID
- DF_DRIVER_CONNECTION_ID_OPTIONS
- DF_DRIVER_CONNECTION_ID_STRING
- DF_DRIVER_NUMBER_CONNECTION_IDS
- Description: Define a DataFlex Connection ID. Used to assign a logical name (Connection ID) to a database connect string.
Error_Debug_Mode
- Value: Integer value
- Associated Attribute: DF_DRIVER_ERROR_DEBUG_MODE
- Description: Sets the error debug mode OFF if the attribute is set to 0 (zero); all other integer values will switch the error debug mode ON. When the error debug mode is ON, all errors generated by the database back-end will be displayed in a message box. This mode can be used in procedural environments where the screen space reserved to show error messages is often too small to show the complete text of the error message.
Find_Cache_Timeout
- Value: Positive integer value (including zero)
- Associated Attribute: DF_DRIVER_FIND_CACHE_TIMEOUT
- Description: Sets the timeout (in milliseconds) for the find cache. The find cache timeout is the maximum time that is allowed between two find operations on records in memory from one table before they are considered outdated. The default value is 100 milliseconds.
Identity_Cache_Size
- Value: Integer value (The default value is 0 (NO CACHE).)
- Associated Attribute: DF_FILE_IDENTITY_CACHE_SIZE
- Description: DB2 identity columns can have an identity cache, which pre-allocates a number of identity values. This identifies how many values for identity columns the system should keep in cache.
Setting identity cache to a value larger than 1 may give better performance when large amounts of new records are created in, for example, a batch process. Refer to the DB2 documentation on Identity Cache for further information.
Ignore_Warnings
- Value: Integer value
- Associated Attribute: DF_DRIVER_IGNORE_WARNINGS
- Description: Switches ignoring warnings ON or OFF. When set to 0 (zero), warnings are reported as errors; all other integer values will cause the driver to ignore all warnings (nothing is reported). By default, warnings are reported as errors.
JIT_Treshold
- Value: Positive integer value
- Associated Attribute: DF_DRIVER_JIT_TRESHOLD
- Description: Sets the native size (in MegaBytes) of a column that defines the column as a “JIT” column. Columns of this size, and those that are bigger, will be fetched using the JIT binding mechanism in tables that have JIT binding switched on. The default value is 10 MegaBytes.
Login_On_Open
- Value: Integer value, 1 or 0
- Associated Attribute: DF_DRIVER_LOGIN_ON_OPEN
- Description: Controls whether a login will be attempted during an open if the program is not already logged in on the connection.
If LOGIN_ON_OPEN is 1 when opening a table and there is no connection, the driver will attempt an automatic login.
If LOGIN_ON_OPEN is 0 when opening a table and there is no connection, the driver will not attempt to login, but generate an error.
MAP_DFASCII_TO_SQLTYPE
- Value: SQL Data type: char, varchar, graphic, vargraphic
- Associated Attribute:
- DF_DATABASE_MAP_DFASCII_TO_SQLTYPE
- DF_DRIVER_MAP_DFASCII_TO_SQLTYPE
- Description: Determines which SQL native data type will be used on the SQL back end when a new DataFlex ASCII column is created.
Existing columns will keep their existing SQL native data type during restructure. To change the native type of an existing column, use DF_FIELD_NATIVE_TYPE.
See Type Mappings for more information.
MAP_DFBINARY_TO_SQLTYPE
- Value: SQL Data type: char, varchar or long varchar (for bit data), blob
- Associated Attribute:
- DF_DATABASE_MAP_DFBINARY_TO_SQLTYPE
- DF_DRIVER_MAP_DFBINARY_TO_SQLTYPE
- Description: Determines which SQL native data type will be used on the SQL back end when a new DataFlex Binary column is created.
Existing columns will keep their existing SQL native data type during restructure. To change the native type of an existing column, use DF_FIELD_NATIVE_TYPE.
See Type Mappings for more information.
MAP_DFDATE_TO_SQLTYPE
- Value: SQL Data type: date
- Associated Attribute:
- DF_DATABASE_MAP_DFDATE_TO_SQLTYPE
- DF_DRIVER_MAP_DFDATE_TO_SQLTYPE
- Description: Determines which SQL native data type will be used on the SQL back end when a new DataFlex Date column is created.
Existing columns will keep their existing SQL native data type during restructure. To change the native type of an existing column, use DF_FIELD_NATIVE_TYPE.
The following example shows how to specify to map DF_DATE to SQL_DATE in the MSSQLDRV.INT file.
; MAP_DFDATE_TO_SQLTYPE: The SQL Server type when creating new DF_DATE columns
; Allowed values: date, datetime
MAP_DFDATE_TO_SQLTYPE date
See Type Mappings for more information.
MAP_DFDATETIME_TO_SQLTYPE
- Value: SQL Data type: timestamp
- Associated Attribute:
- DF_DATABASE_MAP_DFDATETIME_TO_SQLTYPE
- DF_DRIVER_MAP_DFDATETIME_TO_SQLTYPE
- Description: Determines which SQL native data type will be used on the SQL back end when a new DataFlex DateTime column is created.
Existing columns will keep their existing SQL native data type during restructure. To change the native type of an existing column, use DF_FIELD_NATIVE_TYPE.
The following example shows how to specify to map DF_DATETIME to SQL_DATETIME2 in the MSSQLDRV.INT file.
; MAP_DFDATETIME_TO_SQLTYPE: The SQL Server type when creating new DF_DATETIME columns
; Allowed values: datetime2, datetime
MAP_DFDATETIME_TO_SQLTYPE datetime2
See Type Mappings for more information.
MAP_DFTEXT_TO_SQLTYPE
- Value: SQL Data type: varchar, long varchar, clob, vargraphic, long vargraphic, DBCLOB
- Note: Blob requires the following additional settings:
Default_Nullable_Binary 1Default_Default_Binary NULL
- Associated Attribute:
- DF_DATABASE_MAP_DFTEXT_TO_SQLTYPE
- DF_DRIVER_MAP_DFTEXT_TO_SQLTYPE
- Description: Determines which SQL native data type will be used on the SQL back end when a new DataFlex Text column is created.
Existing columns will keep their existing SQL native data type during restructure. To change the native type of an existing column, use DF_FIELD_NATIVE_TYPE.
See Type Mappings for more information.
Match_Client_Server_Version
- Value: Boolean value
- Associated Attribute: DF_DRIVER_MATCH_CLIENT_SERVER_VERSION
- Description: If this keyword is set to True, the driver will check if the version of the database client and server software match. If the client version is less than the server version, an error will be raised when connecting to the server.
If the setting is set to False (the default), versions will not be checked.
Minimum_Driver_Version
- Value: Integer value
- Associated Attribute: DF_DRIVER_MINIMUM_CLIENT_VERSION
- Description: In general, it is best to use matching client and server versions. For this, the Match_Client_Server_Version driver configuration keyword can be used.
Using an older client with newer server versions may sometimes cause unpredictable results.
Report_Active_Column_Errors
- Value: Integer value
- Associated Attribute: DF_DRIVER_REPORT_ACTIVE_COLUMN_ERRORS
- Description: Switches error reporting on active columns ON or OFF. The reporting is OFF if the attribute is set to 0 (zero); all other integer values will switch reporting ON. By default, active column errors are not reported.
Report_Cache_Errors
- Value: Integer value
- Associated Attribute: DF_DRIVER_REPORT_CACHE_ERRORS
- Description: Switches reporting on cache read errors ON or OFF. The reporting is OFF if the attribute is set to 0 (zero); all other integer values will switch reporting ON. By default, cache read errors are not reported.
Silent_Login
- Value: Integer value
- Associated Attribute: DF_DRIVER_SILENT_LOGIN
- Description: Switches the login pop-up panel ON or OFF. The panel pops up if the attribute is set to 0 (zero); all other integer values will ensure the panel does not pop up. By default, the panel will pop up.
Trim_Varchar_Values
- Value: Integer value (0 = False, 1 = True)
- Associated Attribute: DF_DRIVER_TRIM_VARCHAR_VALUES
- Description: Determines whether values are trimmed when stored in a SQL varchar column.
See Padding and Trimming in SQL Databases for further information.
Truncate_Binary_Zeroes
- Value: Integer value
- Associated Attribute: DF_DRIVER_TRUNCATE_BINARY_ZEROES
- Description: Switches truncating of trailing binary zeroes ON or OFF. When set to 0 (zero), trailing binary zeroes are not truncated; any other integer value will truncate the trailing binary zeroes. By default, trailing zeroes are not truncated.
Use_Cache
- Value: Integer value
- Associated Attribute: DF_DRIVER_USE_CACHE
- Description: Switches the use of structure caching ON or OFF. Structure cache is OFF if the attribute is set to 0 (zero); all other integer values will switch structure caching ON. By default, structure cache is ON.
Use_Cache_Expiration
- Value: Integer value
- Associated Attribute: DF_DRIVER_USE_CACHE_EXPIRATION
- Description: Switches the structure caching intermediate file expiration checking ON or OFF. Expiration check is OFF if the attribute is set to 0 (zero); all other integer values will switch reporting ON. By default, expiration checking is ON.
Use_DF_LockError
- Value: Integer value
- Associated Attribute: DF_DRIVER_USE_DF_LOCKERROR
- Description: Switches the translation of deadlock and lock timeout errors to
DFERR_LOCK_TIMEOUTON or OFF. Translation is off if set to 0 (zero); all other integer values will switch translation on. By default, the translation is on.
Sample Configuration File
A sample configuration file is installed in the DataFlex bin directory. The file is called db2_drvsample.int. It contains all possible settings and comments that describe the settings.
A configuration file that sets up date columns not to allow null values and to use the system date as the default value looks like:
DEFAULT_NULLABLE_DATE 0
DEFAULT_DEFAULT_DATE {fn current_date()}