Linux idle standby: Configuring WebSphere Portal Express to use Oracle RACAdded by IBM on June 23, 2012 | Version 1 (Original)
|This section provides information on how to manually transfer data to the Oracle RAC database you have installed and set up. Follow these steps to transfer WebSphere® Portal, and Java™ Content Repository databases to Oracle. As an alternative to the manual database transfer procedure described here, 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.
This section provides information on how to manually transfer data to the Oracle RAC database you have installed and set up. Follow these steps to transfer WebSphere
® Portal, and Java
™ Content Repository databases to Oracle. As an alternative to the manual database transfer procedure described here, 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.
Before you begin:
Ensure that the following prerequisites are met:
- Supported database software is installed.
- Databases and users are set up.
- Property files are modified.
- 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.
- The WebSphere Portal server must explicitly connect to one RAC node during database transfer. You need to specify the information of one Oracle RAC node as if it is the only database server. For example, the Oracle database URL should look like the following: jdbc:oracle:thin:@PRIMARY_NODE_HOSTNAME:1521:PRIMARY_NODE_INSTANCENAME. When database transfer is completed, the WebSphere Portal server will be configured to use this single database server.
- Manually specify an RAC datasource URL in the WebSphere Application Server console. The URL should look like the following:
- When doing a single database, single user, and multi schema database transfer, there can be only one user for each domain (release, community, customization, JCR, Feedback, and LikeMinds), and the schema for each database must be different. The user must be a superuser or DBA and must have authority over all other schemas for the transfer to work.
- Open a command prompt and change to the directory wp_profile_root/ConfigEngine.
- 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
- 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.
- After transferring the database tables, run the dbms_stats.gather_schema_stats command to avoid slow database response.
Start sqlplus and log in to the jcr.DbName database as the jcr.DbUser
SQL> execute dbms_stats.gather_schema_stats(ownname=> 'jcr.DbUser', cascade=> TRUE);
SQL > commit;
In this example, jcr.DbName
is the value you specified for jcr.DbName in the wkplc_dbdomain.properties file. jcr.DbUser
is the value you specified for jcr.DbUser in the wkplc_dbdomain.properties file.
- Specify the JDBC URL to connect to the cluster:
- Login to the WebSphere Application Server Administrator Console
- Navigate to Resources -> JDBC Providers
- If there is a value in the Node field, remove it and click Apply.
- For each Oracle JDBC provider, repeat the following steps:
- Click the provider name.
- Select Data Sources.
- Click the name of the data source.
- Under the Oracle data source properties, modify the URL attribute according to Oracle RAC configuration:
- Save your changes
- 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 server.
See Starting and stopping servers, deployment managers, and node agents for instructions.
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.