Solaris clustered server: Change DB2 driver types
WebSphere Portal requires the use of either the IBM DB2 Legacy JDBC driver in type 2 mode or the IBM DB2 Universal JDBC driver in type 4 mode when connecting to DB2.Before beginning, ensure that the following conditions are met:
- The WebSphere Portal database has been successfully transferred to DB2 using the database-transfer configuration task.
- The files wkplc_dbdomain.properties and wkplc_dbtype.properties have been modified to set the correct values for the DB2 drivers that we are switching to:
In the file wkplc_dbdomain.properties set each <Domain>.DbUrl property using the following formats:
# db2 (type 2): { jdbc:db2:wpsdb } # db2 (type 4): { jdbc:db2://<YourDatabaseServer>:50000/wpsdb:returnAlias=0; }In the file wkplc_dbtype.properties set the db2.DbLibrary property using the following format:
# For DB2 Type 2 driver use <SQLLIB>/java/db2jcc4.jar # For DB2 Type 4 driver use <SQLLIB>/java/db2jcc4.jar:<SQLLIB>/java/db2jcc_license_cu.jarIn the file wkplc_dbtype.properties set the db2.DbDriver property using the following format:
# For DB2 Type 2 driver use com.ibm.db2.jcc.DB2Driver # For DB2 Type 4 driver use com.ibm.db2.jcc.DB2Driver
If WebSphere Portal is installed on the same machine as the DB2 server and you switch from a JDBC Type 4 connection to a JDBC Type 2 connection, verify that you have created the alias names for the DB2 databases as described in Create remote databases and that the alias names are specified for the databases in the file wkplc_dbdomain.properties.
When switching from a JDBC Type 2 connection to a JDBC Type 4 connection, remove the database alias names and refer to the databases directly. This is required because of a limitation in the DB2 Universal JDBC driver.
- cd WP_PROFILE/ConfigEngine
- Export the DB2 user profile that createdd when installing DB2 onto the administrative user . This command exports the DB2 user's profile onto the administrative user so that they can access the DB2 utilities.
. /home/db2inst1/sqllib/db2profile...where db2inst1 represents the database instance
Complete this step before running database tasks and before enabling security.
- Validate configuration properties...
./ConfigEngine.sh validate-database -DWasPassword=foo
Add -DTransferDomainList to the validating task to specify the domains to validate; for example...
-DTransferDomainList=jcr
To validate all domains, do not specify this parameter.
- cd WP_PROFILE/bin
- Stop the WebSphere_Portal server:
./stopServer.sh WebSphere_Portal -username wpadmin -password foo
- cd WP_PROFILE/ConfigEngine
- To change from one supported driver to the other, run the following task to connect the database, including only the domains that require the switch.
./ConfigEngine.sh connect-database -Drelease.DbPassword=foo -Dcustomization.DbPassword=foo -Dcommunity.DbPassword=foo -Djcr.DbPassword=foo -Dfeedback.DbPassword=foo -Dlikeminds.DbPassword=foo -DWasPassword=foo
- cd WP_PROFILE/bin
- Start the WebSphere Portal server.