DB2 Version 10.1 for Linux, UNIX, and Windows

IBM data server driver configuration file location

You can use the contents of the sample db2dsdriver.cfg.sample file to create an IBM® data server driver configuration file (db2dsdriver.cfg). The location of the sample configuration file depends on your IBM data server product installation and operating system.

The location of the IBM data server driver configuration file is listed based on IBM data server product installation:
  • For IBM Data Server Client, IBM Data Server Runtime Client, or IBM Data Server Driver Package, the configuration file is created in one of the listed paths:
    • On AIX®, HP-UX, Linux, or Solaris operating systems: instance_path/cfg
    • On Windows XP Professional and Windows Server 2003: C:\Documents and Settings\All Users\Application Data\IBM\DB2\driver_copy_name\cfg
    • On Windows Vista, Windows 7, and Windows Server 2008: C:\ProgramData\IBM\DB2\driver_copy_name\cfg
    For example, if you use IBM Data Server Driver Package for Windows XP Professional or Windows Server 2003, and the data server driver copy name is IBMDBCL1, then the db2dsdriver.cfg.sample file is created in the C:\Documents and Settings\All Users\Application Data\IBM\DB2\IBMDBCL1\cfg directory.
  • For IBM Data Server Driver for ODBC and CLI, the configuration file is created in one of the listed paths:
    • On AIX, HP-UX, Linux, or Solaris operating systems: instance_path/cfg
    • On Windows XP Professional and Windows Server 2003: C:\Documents and Settings\All Users\Application Data\IBM\DB2\installation_path\cfg
    • On Windows Vista, Windows 7, and Windows Server 2008: C:\ProgramData\IBM\DB2\installation_path\cfg
    Note: On Windows operating systems, the sample configuration file is created when you run the db2cli install -setup command with the administrator authority:
    The installation_path is the directory where the IBM Data Server Driver for ODBC and CLI product was extracted to. For example, if you installed the IBM Data Server Driver for ODBC and CLI product on Windows 7 operating system, and the product is installed in the C:\IBMDB2\CLIDRIVER\ directory, then the db2dsdriver.cfg.sample file is created in the C:\ProgramData\IBM\DB2\C_IBMDB2_CLIDRIVER\cfg directory.

You can use the DB2DSDRIVER_CFG_PATH registry variable to specify multiple paths for the IBM data server driver configuration file. The IBM data server driver configuration file paths in the DB2DSDRIVER_CFG_PATH registry variable must be specified in the order of precedence. When the DB2DSDRIVER_CFG_PATH registry variable is set, only the paths that are specified in the DB2DSDRIVER_CFG_PATH registry variable are searched in listed sequence.

You can manually copy and edit the IBM data server driver configuration file. After you edit the file, you must restart your ODBC, CLI, .NET, OLE DB, PHP, Ruby, or embedded SQL applications for the changes to take effect. The IBM data server driver configuration file is read when application starts.

If you have an IBM Data Server Runtime Client or IBM Data Server Client, you can copy the existing database directory information into the IBM data server driver configuration file by using the db2dsdcfgfill command. When you run the db2dsdcfgfill command, the configuration file is populated based on the contents of the local database directory, node directory, and Database Connection Services (DCS) directory of a specific database manager instance.

IBM Data Server Client and IBM Data Server Runtime Client can catalog remote databases locally. IBM Data Server Client and IBM Data Server Runtime Client derive database, host, and port information from the database and node catalog directories and use that information to locate the corresponding entries in the IBM data server driver configuration file. Even if the DCS directory is cataloged with a different target database, the database name that is specified in the database directory is used to locate the corresponding entry in the IBM data server driver configuration file.

In Version 10.1 Fix Pack 2 and later fix packs, silent installation on Windows operating systems accepts a customized IBM data server driver configuration file. You can use the DB2DSDRIVER_CFG_SOURCE_PATH response file keyword to specify the full path of a customized IBM data server driver configuration file. The IBM data server driver configuration file is then copied from the path that is specified in the DB2DSDRIVER_CFG_SOURCE_PATH response file keyword to the common application data path. Any existing IBM data server driver configuration file in the common application data path is silently overwritten by the customized IBM data server driver configuration file in the DB2DSDRIVER_CFG_SOURCE_PATH path during an upgrade operation.

For example, you can specify a modified IBM data server driver configuration file as mydsdriver.cfg:
DB2_COMMON_APP_DATA_TOP_PATH=C:\My Common App Data
DB2DSDRIVER_CFG_SOURCE_PATH = C:\Common Repository\mydsdriver.cfg
COPY_NAME = IBMDB2CL4
Attention: Any existing db2dsdriver.cfg file in the common application data path is silently overwritten by this customized configuration file during an upgrade operation.
So, for example, during silent installation, the mydsdriver.cfg file is copied to the common application data path as db2dsdriver.cfg.