Change driver types
WebSphere Portal requires either JDBC Type 2 or Type 4 drivers. View the steps to switch from one driver type to the other. Before you begin, 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_comp.properties and wkplc_dbtype.properties have been modified to set the correct values for the DB2 drivers that you are switching to:In the file wkplc_comp.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/db2java.zip # For DB2 Type 4 driver use SQLLIB/java/db2jcc.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.jdbc.app.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 Creating remote databases and that the alias names are specified for the databases in the file wkplc_comp.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.
Prerequisites
- Installing DB2
- Create users
- Creating remote databases
- Modifying database properties
- Set up DB2
- Configure DB2 for large file handling in Web Content Management
- Open a command prompt and change to the directory profile_root/ConfigEngine.
- Using a JDBC Type 2 driver only, export the DB2 user profile that created when installing DB2 onto the administrative user using the following command. This command gives that administrative user rights over DB2.
. /home/db2inst1/sqllib/db2profilewhere db2inst1 represents your database instanceYou must complete this step before running database tasks and before enabling security to create a suitable JDBC driver.
- Enter the following commands to validate configuration properties.
./ConfigEngine.sh validate-database-driver -DTransferDomainList=release,customization,community,jcr,feedback,likeminds -DWasPassword=password./ConfigEngine.sh validate-database-connection -DTransferDomainList=release,customization,community,jcr,feedback,likeminds -DWasPassword=password- From the same command prompt as the previous steps, change to the directory profile_root/bin.
- Stop both WAS and the WebSphere Portal server:
Option Description WAS ./stopServer.sh server1-username admin_userid -password admin_password WebSphere Portal ./stopServer.sh WebSphere_Portal -username admin_userid -password admin_password
- cd profile_root/ConfigEngine.
- To change from one supported driver to the other, to connect the database, including only the domains that require the switch.
./ConfigEngine.sh connect-database -Drelease.DbPassword=password -Dcustomization.DbPassword=password -Dcommunity.DbPassword=password -Djcr.DbPassword=password -Dfeedback.DbPassword=password -Dlikeminds.DbPassword=password -DWasPassword=password- Change to the directory profile_root/bin.
- Enter the following command to start the WebSphere Portal server: ./startServer.sh WebSphere_Portal
Parent topic:
Configure WebSphere Portal to use DB2
Previous topic:
Configure DB2 for large file handling in Web Content Management