Set up an i5/OS database in a cluster

 

+
Search Tips   |   Advanced Search

 

To communicate with a database, servers running IBM i5/OS can use either of two JDBC drivers:

  • IBM Toolbox for Java JDBC driver
  • IBM Developer Kit for Java JDBC driver (native JDBC driver)

Which JDBC driver you should use depends on how you are setting up the clustered environment. The JDBC driver is specified by the property...

db2_iseries.DbDriver

...in...

portal_server_root/config/wpconfig_dbtype.properties

We can specify the value by editing the file manually or by selecting the appropriate value using the configuration wizard.

Native JDBC driver: com.ibm.db2.jdbc.app.DB2Driver
IBM Toolbox for Java JDBC driver: com.ibm.as400.access.AS400JDBCDriver

 

Scaling topology considerations

Vertical and horizontal scaling topologies in an i5/OS environment require different JDBC driver configurations, according to how you deploy your database.

Scaling topology JDBC driver considerations
Vertical scaling When setting up a vertical cluster, we can install the database locally on the same machine as the portal or remotely on a separate machine. Use the appropriate JDBC driver, depending on where the database is installed.

Local database: Either the native JDBC driver or the IBM Toolbox for Java JDBC driver can be used.
Remote database: The IBM Toolbox for Java JDBC driver must be used for connections to a remote database.

Horizontal scaling When setting up a horizontal cluster, use the IBM Toolbox for Java JDBC driver.

The typical configuration is to use a remote database for primary and secondary nodes in the cluster. If you choose, we can use a local database for the primary node and configure the secondary nodes to use that database, just as you would any other remote database. However, regardless of whether you choose to include a local database in the environment, use the IBM Toolbox for Java JDBC driver with the horizontal cluster.

For more information on using a local database for the primary node, refer to Using a local database in an i5/OS horizontal cluster.

For details on using the JDBC drivers with the i5/OS system, refer to the i5/OS documentation: JDBC.

 

Use a local database in an i5/OS horizontal cluster

Although the instructions for setting up a horizontal cluster describe how to use a remote database for both primary and secondary nodes, we can choose to configure the i5/OS horizontal cluster to use a local database for the primary node instead.

Although it is possible to use a local database on a secondary node instead of the primary node, this configuration has not been tested and is not documented here.

Even though you are using a local database for the primary node in this scenario, all database connections are configured as if the database were remote. Specifically, use the IBM Toolbox for Java JDBC driver...

com.ibm.as400.access.AS400JDBCDriver

...when configuring the database for both primary and secondary nodes.

To use a local database with the primary node, perform the database configuration as described in Creating a schema on a remote database, with the following variations when updating properties files in the portal_server_root/config directory.

wpconfig_dbtype.properties

  • Specify the JDBC driver in the db2_iseries.DbDriver property. For example:

        db2_iseries.DbDriver=com.ibm.as400.access.AS400JDBCDriver 
    

  • Database location as remote in the db2_iseries.DbDriverType property. For example:

        db2_iseries.DbDriverType=4
    

wpconfig_dbdomain.properties

  • Specify the primary node's host.name for the domain.DbName properties. For example:

        release.DbName=primary_host_name/wpsdb 

  • Specify the primary node's host.name in the domain.DbUrl properties. For example:

    release.DbUrl=jdbc:as400:primary_host_name/wpsdb 

If using the configuration wizard for database transfer, update the values in the wizard panels rather than in the properties files.

Complete all other configuration as described. When configuring secondary nodes in this scenario, perform the database configuration as you would for any remote database, using the primary node's host.name for the database transfer.

 

Parent topic:

Clustering and WebSphere Portal