Windows 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
Change from one supported driver to the other...
- Validate configuration properties
cd WP_PROFILE/ConfigEngine
./ConfigEngine.bat validate-database -DWasPassword=fooSpecify the domain to validate;
./ConfigEngine.bat validate-database -DWasPassword=foo -DTransferDomainList=jcr
- Stop portal
cd WP_PROFILE/bin
stopServer.bat WebSphere_Portal -username wpadmin -password foo
- To change from one supported driver to the other, run the following task. Include only the domains that require the switch.
cd WP_PROFILE/ConfigEngine
ConfigEngine.bat connect-database -Drelease.DbPassword=foo -Dcustomization.DbPassword=foo -Dcommunity.DbPassword=foo -Djcr.DbPassword=foo -Dfeedback.DbPassword=foo -Dlikeminds.DbPassword=foo -DWasPassword=foo
- Start portal
cd WP_PROFILE\bin
startServer.bat WebSphere_Portal