Setting the Microsoft SQL Server environment variables
The Microsoft SQL Server environment variables must be set in the db2dj.ini file on the federated server.
About this task
Restrictions
Review the restrictions for the db2dj.ini file before you begin this task.
The db2dj.ini file contains configuration information about the Microsoft SQL Server ODBC driver that is installed on your federated server.
There are required and optional environment variables for Microsoft SQL Server data sources.
If you installed the Microsoft SQL Server client software before you installed the Microsoft SQL Server wrapper, the required Microsoft SQL Server environment variables are set in the db2dj.ini file.
You must set the environment variables by using the steps in this task if you did not install the Microsoft SQL Server client software before you installed the Microsoft SQL Server wrapper or if you want to set any of the optional environment variables.
- DJX_ODBC_LIBRARY_PATH
- ODBCINI
- DJX_ODBC_LIBRARY_PATH
- Specifies the directory path to the ODBC library files.For example:
DJX_ODBC_LIBRARY_PATH=ODBC_driver_directory/libODBC_driver_directory is the directory path where the ODBC driver is installed.
Starting with Db2 V11.1.1.1, the SQL Server ODBC driver is bundled with the product installation package and the default lib path is set to: $INSTANSE_HOME/sqllib/federation/odbc/lib/. For Db2 11.1 GA version you can refer to this technote.
- ODBCINI
- Specifies the directory path where your ODBC configuration file
(odbc.ini) is located. For example:
ODBCINI=/home/db2inst1/odbc.iniDo not set the ODBCINI environment variable as a system variable.
You can set the environment variables by using the steps in this task if you did not install the Microsoft SQL Server client software before you installed the Microsoft SQL Server wrapper or if you want to set any of the optional environment variables.