Setting Db2 parameters

Ensure that you set the following DB2® parameters.

About this task

Db2 provides a JDBC driver, which can be used either in type two architecture or type four architectures. You can use either architecture with IBM® InfoSphere® Master Data Management Collaboration Server - Collaborative Edition.

Procedure

  1. Configure the [db.<type>] section that corresponds to the value of type in the database section.
    For example, if you are using Db2, set type=db2 in the database section and configure the [db.db2] section.
  2. Configure the JDBC driver type parameter in the [db] section for Db2.
    1. For Type 4 architecture:
      1. Type four architectures is the default type.
      2. Set the jdbc_driver_type parameter to 4.
      3. Set the port parameter in the [db] section to the port the Db2 listener is on. Ask your database administrator for the port.
    2. For Type 2 architecture:
      1. Set the jdbc_driver_type parameter to 2. The port and host name parameters in the db.db2 section are ignored.
  3. Configure the [db.db2] section for Db2. Set the following parameters:
    1. Set the following parameters in the [db.db2] section.
    alias
    This parameter is in the [db.db2] section in the env_settings.ini file. This parameter is used by the CLP and the JDBC Type 2 drivers. It is the alias the CLP uses in the CONNECT statement.
    db_name
    This parameter is in the [db.db2] section in the env_settings.ini file. The db_name parameter defaults to the value of the alias parameter, therefore, db_name must be set only when the name of the database differs from the alias the client uses. This parameter is only used for Type 4 connections.

Example

Here is a simple example if you were using a Type 4 connection, you would have:
Client alias = 'mydb', db name = 'mydb'

[db]
type-=db2
username=dbuesr
password=somepwd
home=/home/db2inst1/sqllib
hostname=my-dbserver.company.com
port=60004
jdbc_driver_type=4

[db.db2]
alias=mydb

Here is an example of a Type 4 connection when the alias is different from the database name:

Client alias = 'mydb', db name = 'mdmpim'
[db]
type-=db2
username=dbuesr
password=somepwd
home=/home/db2inst1/sqllib
hostname=my-dbserver.company.com
port=60004
jdbc_driver_type=4

[db.db2]
alias=mydb
db_name=mdmpim

Here is a simple example if you were using a Type 2 connection, you would have:

[db]
type-=db2
username=dbuesr
password=somepwd
home=/home/db2inst1/sqllib
#hostname=my-dbserver.company.com
#port=60004
jdbc_driver_type=2