DB2 Version 9.7 for Linux, UNIX, and Windows
IBM data server clients and drivers overview > IBM Data Server Drivers >

db2dsdriver configuration file

The configuration file db2dsdriver.cfg contains database directory information and client configuration parameters in a human-readable format.

The db2dsdriver.cfg configuration file is an ASCII file containing various keywords and values that can be used to make a connection to a supported database through ODBC, CLI, .NET, OLE DB, or open source (PHP or Ruby) and the applications using the keywords. The keywords are associated with the database alias name, and affect all the applications that access the database. You can also use this configuration file to specify Sysplex-related settings.

This configuration file can be used with the following data server drivers:

You do not need to create and populate the db2dsdriver.cfg configuration file to these drivers, they can function without this configuration file. However, instead of specifying database name, host, port, and configuration parameters information in your applications, you can use the configuration file to specify aliases.

In addition, if you have an existing IBM data server client ( IBM Data Server Runtime Client or IBM Data Server Client), you can copy the existing database directory information into the db2dsdriver.cfg configuration file using the db2dsdcfgfill command. Using this 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.

The various keywords, values and specific database connection settings specified in the configuration file apply to all ODBC, CLI, .NET or open source application connections made to that database or alias.

The db2dsdriver.cfg configuration file can be edited. However, the file must be edited manually. In addition, after editing the file, you must restart the application for the changes to take effect. The configuration file is created in one of the following paths:

The configuration file cannot contain multiple identical entries for a database with the following properties: database name, server name and port number. In addition, the configuration file cannot contain multiple identical database alias entries.

A sample configuration file is shipped to help you get started. It is located in the sqllib/cfg directory. The configuration file contains the following sections:

<configuration>
	<DSN_Collection>
		<dsn alias="alias1" name="name1" host="server1.net1.com" port="50001"/>
		<!-- Long aliases are supported -->
		<dsn alias="longaliasname2" name="name2" host="server2.net1.com" port="55551">
			<parameter name="Authentication" value="Client"/>
		</dsn>
	</DSN_Collection>
	<databases>
		<database name="name1" host="server1.net1.com" port="50001">
			<parameter name="CurrentSchema" value="OWNER1"/>
			<wlb>
				<parameter name="enableWLB" value="true"/>
				<parameter name="maxTransports" value="50"/>
			</wlb>
			<acr>
				<parameter name="enableACR" value="true"/>
			</acr>
		</database>
		<!-- Local IPC connection -->
		<database name="name3" host="localhost" port="0">
			<parameter name="IPCInstance" value="DB2"/>
			<parameter name="CommProtocol" value="IPC"/>
		</database>
	</databases>
	<parameters>
		<parameter name="GlobalParam" value="Value"/>
	</parameters>
</configuration>
Note:
The DSN_Collection entries (alias, name, host, and port) must contain values and cannot be empty. In addition, the database entries (name, host, port) must also contain values.
[ Top of Page | Previous Page | Next Page | Contents ]