Customization of IBM Data Server Driver for JDBC and SQLJ configuration properties

The IBM Data Server Driver for JDBC and SQLJ configuration properties let you set property values that have driver-wide scope. Those settings apply across applications and DataSource instances. You can change the settings without having to change application source code or DataSource characteristics.

Each IBM Data Server Driver for JDBC and SQLJ configuration property setting is of this form:
property=value

IBM Data Server Driver for JDBC and SQLJ configuration property names are case-sensitive.

You can set configuration properties in the following ways:

  • Set the configuration properties as Java™ system properties. Configuration property values that are set as Java system properties override configuration property values that are set in any other ways.

    For stand-alone Java applications, you can set the configuration properties as Java system properties by specifying -Dproperty=value for each configuration property when you execute the java command.

  • Set the configuration properties in a resource whose name you specify in the db2.jcc.propertiesFile Java system property. For example, you can specify an absolute path name for the db2.jcc.propertiesFile value.

    For stand-alone Java applications, you can set the configuration properties by specifying the -Ddb2.jcc.propertiesFile=path option when you execute the java command.

  • Set the configuration properties in a resource named DB2JccConfiguration.properties. A standard Java resource search is used to find DB2JccConfiguration.properties. The IBM Data Server Driver for JDBC and SQLJ searches for this resource only if you have not set the db2.jcc.propertiesFile Java system property.

    DB2JccConfiguration.properties can be a stand-alone file, or it can be included in a JAR file.

    If the DB2JccConfiguration.properties file is in the ISO 8859-1 (Latin-1) encoding scheme, or is in the Latin-1 encoding scheme with some Unicode-encoded (\udddd) characters, you do not need to do character conversion before the IBM Data Server Driver for JDBC and SQLJ can use the file. If the DB2JccConfiguration.properties file is in some other encoding scheme, you need to use the Java native2ascii converter to convert the contents to Latin-1 or Unicode-encoded characters.

    If DB2JccConfiguration.properties is a stand-alone file, the path for DB2JccConfiguration.properties must be in the CLASSPATH concatenation.

    If DB2JccConfiguration.properties is in a JAR file, the JAR file must be in the CLASSPATH concatenation.