Solaris stand-alone: Change DB2 driver types
WebSphere Portal requires the use of either the IBM DB2Legacy JDBC driver in type 2 mode or the IBM DB2 Universal JDBC driver in type 4 mode when connecting to DB2.
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_dbdomain.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_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: If you are using DB2 Version 9.1 use the db2jcc.jar file. You will need to replace references to db2jcc4.jar with db2jcc.jar in this topic. If you are not using this specific version of DB2, use the db2jcc4.jar file.
# 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.DB2DriverIf 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.
Prerequisites
Install DB2
Modify DB2 database properties
Create groups and assigning users
Create DB2 databases
Set up DB2 automatically or manually
Configure WebSphere Portal to use DB2
Configure DB2 for large file handling in WCM
- Open a command prompt and
cd WP_PROFILE/ConfigEngine
- Use a JDBC Type 2 driver only, export the DB2 user profile that you created when installing DB2 onto the administrative user using the following command. This command exports the DB2 user's profile onto the administrative user so that they can access the DB2 utilities.
. /home/db2inst1/sqllib/db2profilewhere db2inst1 represents database instance You must complete this step before running database tasks and before enabling security.
- Enter the ./ConfigEngine.sh validate-database -DWasPassword=foo command to validate configuration properties.
Add -DTransferDomainList to specify the domains to validate; for example: -DTransferDomainList=jcr.
- From the same command prompt as the previous steps, cd WP_PROFILE/bin.
- Stop both the server1 and WebSphere_Portal servers:
- ./stopServer.sh server1 -username admin_userid -password foo
- ./stopServer.sh WebSphere_Portal -username admin_userid -password foo
- Change to the directory 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
- Change to the directory WP_PROFILE/bin.
- Start the WebSphere Portal server.
See Start and stopping servers, dmgrs, and node agents for instructions.
Parent
Set up a DB2 database
Previous
Configure DB2 for large file handling in WCM