Linux stand-alone: Configure WebSphere Portal to use Oracle or Oracle RAC
This section provides information on how to manually transfer data from the default database to the Oracle 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.
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.
Prerequisites
Install Oracle or Oracle RAC
Modify Oracle or Oracle RAC database properties
Create Oracle or Oracle RAC databases
Set up Oracle or Oracle RAC automatically or manually
Tips:For Oracle RAC only:
- 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 WAS console. The URL should look like the following:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=PRIMARY_NODE_HOSTNAME)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=SECONDARY_NODE_HOSTNAME)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=DATABASE_SERVICENAME))).
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. 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
cd WP_PROFILE/ConfigEngine
- 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
- Transfer the database:
Do not execute the database-transfer task as a background process. This might cause the task to stall.
- Change to the directory WP_PROFILE/ConfigEngine.
- Enter the following command:
./ConfigEngine.sh database-transfer -DWasPassword=fooTo select specific database domains to transfer, set -DTransferDomainList to include only the domains that you want to transfer. For example, to transfer only the JCR domain:./ConfigEngine.sh database-transfer -DTransferDomainList=jcr -DWasPassword=foo
- After running the task, a message is added to the following log file for you to verify the task ran successfully:
WP_PROFILE/ConfigEngine/log/ConfigTrace.log
If the configuration fails, verify the values in wkplc.properties, wkplc_dbdomain.properties, and wkplc_dbtype.properties and then repeat this step.
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:
- 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, also copy grantExtendedPermissionsToRuntimeRole.sql.
- Locate these files in the following directories, where dbms is database management system, and domain represents the database domains you are configuring. Substitute domain with release, customization, community, jcr, feedback, and likeminds as appropriate:
$PORTAL_HOME/base/wp.db.impl/config/templates/setupdb/dbms/domain
$PORTAL_HOME/pzn/prereq.pzn/config/templates/setupdb/dbms/domain
- 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/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
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. Example:
SQL> execute dbms_stats.gather_schema_stats(ownname=> 'jcr', cascade=> TRUE);
Run the ./ConfigEngine.sh create-jcr-jms-resources-post-dbxfer -DWasPassword=foo command to create JMS resources in the new database. Regardless of the method used to transfer data (configuration wizard or the steps in this topic), run this task to create JMS resources.
Change to the directory WP_PROFILE/bin.
Start the WebSphere Portal server. See Start and stopping servers, dmgrs, and node agents for instructions.
If you have additional nodes already configured, compare the following file on all nodes with the file from the primary node. Ensure all instances of the file are identical:WP_PROFILE/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.
- Stop the portal server on the secondary node.
- Copy
WP_PROFILE/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.
Parent
Set up a remote Oracle or Oracle RAC database
Previous
Set up Oracle or Oracle RAC automatically or manually
Removed incorrect reference to wkplc_comp.properties removed the duplicate step for dbdomain.DbRuntimeUser and removed inco...