AIX clustered server: Configuring WebSphere Portal to use DB2Added by IBM on June 24, 2012 | Version 1 (Original)
|View information on how to manually transfer data to the DB2® database you have installed and set up. Follow these steps to transfer WebSphere® Portal Express®, and Java™ Content Repository databases to DB2. As an alternative to the manual database transfer procedure that this topic describes, you can use the configuration wizard to complete the database transfer task. However, you cannot specify all settings through the configuration wizard. For example, regardless of the method used to transfer data, you must run a configuration task to create JMS resources as described in this topic. You must also specify the required settings in the appropriate property files before transferring the database with the configuration wizard.
View information on how to manually transfer data to the DB2
® database you have installed and set up. Follow these steps to transfer WebSphere
® Portal Express
®, and Java
™ Content Repository databases to DB2
. As an alternative to the manual database transfer procedure that this topic describes, you can use the configuration wizard to complete the database transfer task. However, you cannot specify all settings through the configuration wizard. For example, regardless of the method used to transfer data, you must run a configuration task to create JMS resources as described in this topic. You must also specify the required settings in the appropriate property files before transferring the database with the configuration wizard.
Before you begin:
Ensure that the following prerequisites are met:
- Supported database software is installed.
- Databases and users are set up.
- To run these tasks as a non-root user, you must first run the task chown -R non-root_user WebSphereDir.
- If you are transferring from Oracle or Oracle RAC, the open_cursors setting should be set to 1500 by default. However, you might need to increase this value based on the table count in the Java Content Repository schema.
- When changing datasource connection properties, see Technote 1372849 (WebSphere Portal SystemOut.log J2CA0056I com.ibm.websphere.ce.cm.StaleConnectionException Connection reset) and Technote 1207584 (WebSphere Application Server StaleConnectionException) for instructions on how to avoid connection issues related to firewall settings when using a remote database.
- If you are running a type 2 connection, edit the db2cli.ini file that resides on the local system, where WebSphere Portal Express is installed, before you transfer data.
The database transfer becomes unresponsive at task action-process-constraints
if you do not complete these steps.
- Locate the file /home/db2inst1/sqllib/cfg/db2cli.ini.
- Add the following lines to the end of the file:
- If a section named [COMMON] already exists in the file, extend that section by adding the following lines. Otherwise, add a [COMMON] section to the file.
- Leave an empty line after ReturnAliases=0.
- Open a command prompt and change to the directory wp_profile_root/ConfigEngine.
- Using 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.
represents your database instance
You must complete this step before running database tasks and before enabling security.
- Enter the ./ConfigEngine.sh validate-database -DWasPassword=password command to validate configuration properties.
Tip: Add the -DTransferDomainList parameter to the above validating task to specify the domains you want to validate; for example: -DTransferDomainList=jcr. If you want to validate all domains, you do not need to specify this parameter on the command line.
- From the same command prompt as the previous steps, change to the directory wp_profile_root/bin.
- Stop both the server1 and WebSphere_Portal servers:
Transfer the database:
- ./stopServer.sh server1 -username admin_userid -password admin_password
- ./stopServer.sh WebSphere_Portal -username admin_userid -password admin_password
Optional: If you specified a runtime database user for the dbdomain.DbRuntimeUser parameter, that user must have sufficient database user privileges. To grant the database user privileges, choose either the manual steps or the command line steps:
Important: Do not execute the database-transfer task as a background process. This might cause the task to stall.
- Change to the directory wp_profile_root/ConfigEngine.
- Enter the following command:
<span translate="0">./ConfigEngine.sh database-transfer -DWasPassword=password</span>
- To select specific database domains to transfer, modify the -DTransferDomainList specified in the command to include only the domains that you want to transfer. For example, to transfer only the JCR domain you can enter the following command: ./ConfigEngine.sh database-transfer -DTransferDomainList=jcr -DWasPassword=password
- If you have been storing data in Apache Derby for a long time, database transfer could fail with OutOfMemory exceptions. If database transfer fails, add the following property to the command in this step: ConfigEngine.bat database-transfer -DDbtJavaMaxMemory=1536M -DWasPassword=password
- After running the task, a message is added to the following log file for you to verify the task ran successfully: wp_profile_root/ConfigEngine/log/ConfigTrace.log
If the configuration fails, verify the values in the wkplc.properties, wkplc_dbdomain.properties, and wkplc_dbtype.properties files and then repeat this step.
- Complete these steps to manually grant database user privileges:
- Copy the appropriate template files to a work directory. Choose one of the following template files:
- createRuntimeRoleForDifferentSchema.sql if the name of the database user and the schema name are not the same.
- createRuntimeRoleForSameSchema.sql if the name of the database user and the schema name are the same.
JCR database domain: For the JCR database domain, you must also copy grantExtendedPermissionsToRuntimeRole.sql.
Locate these files in the following directories, where dbms is your database management system, and domain represents the database domains you are configuring. Substitute domain with release, customization, community, jcr, feedback, and likeminds as appropriate:
- Replace all placeholder values with the values as defined in wkplc_dbdomain.properties. Placeholder values are surrounded by the character @.
- Run these statements.
- Complete these steps to grant database user privileges with the ConfigEngine task:
- Ensure the database administrator user ID is specified for domain.DBA.DbUser in wp_profile_root/ConfigEngine/properties/wkplc_dbdomain.properties. For example, domain.DBA.DbUser=dbadmin.
- Run the following task: ./ConfigEngine.sh grant-runtime-db-user-privileges -DTransferDomainList=comma_separated_list_of_domains
Note: You only need to add -DTransferDomainList=comma_separated_list_of_domains to this task when granting privileges across specific domains.
db2 reorg table tablename
- After transferring the database tables, perform a reorg check to improve performance. Perform this step for each database in the property file.
- Connect to a database with the following command:
<span translate="0">db2 connect to dbName user db2admin_userid
Additional options might be required if additional security has been installed. Refer to DB2 Universal Database
™ commands by example for links to the command reference.
- After it is connected, run the following commands from the DB2 prompt:
db2 reorgchk update statistics on table all > xyz.out
- Look in the reorg column for entries marked with a star or asterisk * in the file xyz.out.
- For each line with *, note the tablename and run the following command for each tablename:
db2rbind database_name -l db2rbind.out -u db2_admin
- After you have run the reorg command for each tablename, run the following commands:
- The output file db2rbind.out is only created when there is an error for the db2rbind command.
- Run the ./ConfigEngine.sh create-jcr-jms-resources-post-dbxfer -DWasPassword=password command to create JMS resources in the new database.
Note: Regardless of the method used to transfer data (configuration wizard or the steps in this topic), you must run this task to create JMS resources.
- Change to the directory wp_profile_root/bin.
- Start the WebSphere Portal Express server.
See Starting and stopping servers, deployment managers, and node agents for instructions.
may fail to start if it is configured to use DB2
while the database instance is stopped.
If you have additional nodes already configured, you need to compare the following file on all nodes with the file from the primary node. Ensure all instances of the file are identical: wp_profile_root/PortalServer/jcr/lib/com/ibm/icm/icm.properties
. If the files are not identical, copy icm.properties
from the primary node on which you ran the database-transfer
task to the node.
Technote 1372849: WebSphere Portal SystemOut.log J2CA0056I com.ibm.websphere.ce.cm.StaleConnectionException Connection reset
Technote 1207584: IBM WebSphere Application Server StaleConnectionException
- Stop the portal server on the secondary node.
- Copy wp_profile_root/PortalServer/jcr/lib/com/ibm/icm/icm.properties from the primary node and replace icm.properties on the secondary node.
- Start the portal server on the secondary node.