![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This chapter describes the steps necessary to use an Oracle database with WebLogic Portal, and includes the following sections:
Review this entire chapter and any release notes before proceeding. The tasks described in this chapter should be performed by a database administrator.
Note: | A WebLogic Portal Oracle database user that has DBA privileges causes database create errors and upgrade issues. Before you create database objects or perform an upgrade, you should revoke the Oracle user's DBA privileges and replace them with the following privileges: GRANT CREATE TABLE, CREATE VIEW, CREATE TRIGGER, CREATE SEQUENCE, CREATE SESSION, UNLIMITED TABLESPACE TO <<WEBLOGIC>>. |
Before proceeding, read Overview of Enterprise-Quality Database Configuration for WebLogic Portal.
The database creation scripts install domain-specific tables. It is recommended that you work with a database administrator to modify the sample scripts, and to create the database users and tablespaces needed for your environment.
Multiple database users are required if you have multiple domains, or to run multiple environments using the same Oracle instance (for example, if you want to run development and system test from a single Oracle installation). GroupSpace requires a separate database user, as do any additional content management repositories.
Note: | Oracle configuration settings can impact Content Search performance; for more information, see Improving Content Search Response Time for Oracle. |
To configure an Oracle database:
WL_HOME
/portal/db/oracle/admin
directory. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the scripts for additional information.
To configure the main WebLogic Portal database, follow these steps:
create_tablespaces.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.create_tablespaces.sql
script. For example, from SQL*Plus:@create_tablespaces.sql
create_users.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.create_users.sql
script. For example, from SQL*Plus:@create_users.sql
Follow the remaining steps only if you want to create database objects manually rather than using the Configuration Wizard. To perform the remaining steps using the Configuration Wizard, see Creating WebLogic Configurations Using the Configuration Wizard.
database.properties
file for edit.database=oracle
. oracle.user=@DB_USER@
oracle.password=@DB_PASSWORD@
oracle.url=jdbc:bea:oracle://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
appsGroupSpaceDataSource
), which point to PointBase by default, with data sources that point to Oracle. You can configure them using the WebLogic Server Administration Console or choose from the samples provided and update them for your database environment. Sample jdbc.xml
definition files for each database and driver that BEA supports are available in the WL_HOME
\portal\db\jdbc\
database_driver directory; for example, oracle_bea
or oracle_thin
. Follow the instructions in the WL_HOME
\portal\db\jdbc\README.txt
file.WEBLOGIC_INDEX
tablespace by executing rebuild_indexes.sql
. Note: | Do this while WebLogic Server is stopped. |
To configure the GroupSpace database, follow these steps:
create_tablespaces.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.create_tablespaces.sql
script. For example, from SQL*Plus:@create_tablespaces.sql
create_users.sql
script and modify it appropriately for your environment and the GroupSpace settings. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.create_users.sql
script. For example, from SQL*Plus:@create_users.sql
Follow the remaining steps only if you want to create database objects manually rather than using the Configuration Wizard. To perform the remaining steps using the Configuration Wizard, see Creating WebLogic Configurations Using the Configuration Wizard.
groupspace_database.properties
file for edit.database=oracle
. oracle.user=@DB_USER@
oracle.password=@DB_PASSWORD@
oracle.url=jdbc:bea:oracle://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
appsGroupSpaceDataSource
JDBC data source (which points to PointBase by default) with a data source that points to Oracle. Use the WebLogic Server Administration Console or update the sample jdbc.xml
definition file provided for each database and driver that BEA supports, in the WL_HOME
\portal\db\jdbc\
database_driver directory; for example oracle_bea
or oracle_thin
. Follow the instructions in the WL_HOME
\portal\db\jdbc\README.txt
file.
For improved performance, you might want to store behavior tracking events in a different location from other WebLogic Portal database objects. For more information about behavior tracking, see Setting Up Events and Behavior Tracking in the Interaction Management Guide.
Note: | By default, behavior tracking database objects are created in the same database as other WebLogic Portal database objects. You need to perform these steps only if you are configuring a separate database for behavior tracking events. |
To create a separate database for behavior tracking:
bt_create_tablespaces.sql
file and the bt_create_users.sql
file for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.bt_create_tablespaces.sql
script. bt_create_users.sql
script.WL_HOME
\portal\db\oracle
WEBLOGIC_EVENT
and run the following scripts:WL_HOME
\portal\db\data\required
:p13n.trackingDataSource
with that data source and then remove p13n.trackingDataSource
from p13nDataSource
.
Table 6-1 describes the scripts that enable you to configure the Oracle database and create WebLogic Portal objects in that database.
Creates table and index tablespaces. If you want to use existing tablespaces, you do not need to run this script. You can use new or existing tablespaces for the main WebLogic Portal database, the GroupSpace database, and any additional content management repositories.
|
|||||||
Creates a user and password, and sets default and temporary tablespaces. Grants privileges to that user.
|
|||||||
|
|||||||
Creates a behavior event tracking schema user and password, and sets default and temporary tablespaces. Grants privileges to that user.
|
This section describes the steps necessary to use Oracle Real Application Cluster (RAC) 10g with WebLogic Portal.
Oracle Real Application Cluster is Oracle's database cluster technology. RAC offers scalability, high-availability and load-balancing at the database tier of a WebLogic Portal deployment. For more information on Oracle RAC please refer to the section Using WebLogic Server with Oracle RAC in the WebLogic Server document Configuring and Managing WebLogic JDBC.
The following sections address the various requirements and configuration choices when using Oracle RAC with WebLogic Portal. These include:
WebLogic Portal 9.2 supports the following Oracle RAC and JDBC driver combinations:
For all the database configurations supported by WebLogic Platform 9.2, refer to WebLogic Platform Support for Databases.
For each JDBC data source used by WebLogic Portal, the following configuration choices need to be considered:
There are two ways to implement JDBC fail-over and load-balancing: through the WebLogic multi-data source, or through the cluster-aware capabilities built into the Oracle Thin Driver. Using WebLogic Server with Oracle RAC includes examples of how these are implemented.
As pointed out in Using WebLogic Server with Oracle RAC, there are some limitations if you are using the Oracle Thin Driver alone to access Oracle RAC. Specifically, you cannot use load-balancing together with XA support.
On the other hand, WebLogic multi-data source fully supports XA with load-balancing. Multi-data source also offers benefits such as faster fail-over and automatic fail-back. These make multi-data source the favorable choice to access RAC. The rest of the document is based on using multi-data source.
WebLogic Portal data sources support both fail-over and load-balancing with the exception of the portalDataSourceNeverXA
data source. The portalDataSourceNeverXA
is used as JDBC Store. As specified in
Using WebLogic Server with Oracle RAC, the data source of a JDBC Store cannot use the load-balancing algorithm.
WebLogic Portal data sources can use either the XA or the non-XA JDBC driver, except p13nDataSource
and portalDataSourceNeverXA
. The p13nDataSource
is used in local JDBC transactions only. The portalDataSourceNeverXA
is used as JDBC Store. As specified in
Using WebLogic Server with Oracle RAC, the data source of a JDBC Store cannot use an XA-compliant JDBC driver.
When the multi-data source is used, it is important to make sure that the multi-data source's value of the global-transaction-protocol attribute is identical to those of all its underlying physical data sources. For a multi-data source, the value of global-transaction-protocol can be configured by either manually editing
${DOMAIN_HOME}/config/jdbc/${DATASOURCE_NAME}-jdbc.xml
or programmatically through WLST scripts. The WebLogic Administration Console does not provide a way to configure this attribute for a multi-data source.
In light of the above considerations, the supported RAC configurations are summarized in Table 6-2.
Note: | The values in the above table are consistent with the JDBC data source configuration files packaged with WebLogic Portal, with the addition of the Multi-Data Source column. |
The configuration steps for Oracle RAC are very similar to those described in the previous sections Configuring the Main WebLogic Portal Database, Configuring the GroupSpace Database, and Manually Creating a Separate Database and Database Objects for Behavior Tracking. Each of these three sections includes seven steps.
Note: | To run the SQL script in this step, log on to any one node of the RAC. The specific node is not important since all Oracle instances in the RAC share the same disk storage. |
create_tablespaces.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.create_tablespaces.sql
script. For example, from SQL*Plus:@create_tablespaces.sql
Note: | To run the SQL script in this step, log on to any one node of the RAC. The specific node is not important since all Oracle instances in the RAC share the same disk storage. |
create_users.sql
script and modify it appropriately for your environment. See
Table 6-1, Database Scripts and Usage Notes, on page 6-7 and the comments in the script for additional information.create_users.sql
script. For example, from SQL*Plus:@create_users.sql
Follow the remaining steps only if you want to create database objects manually rather than using the Configuration Wizard. To perform the remaining steps using the Configuration Wizard, see Creating WebLogic Configurations Using the Configuration Wizard.
database.properties
file for edit.database=oracle
. oracle.user=@DB_USER@
oracle.password=@DB_PASSWORD@
oracle.url=jdbc:bea:oracle://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
Note: | In the oracle.url string, replace @DB_HOST@ and @DB_NAME@ with the hostname and SID of any one node in the RAC. Since all Oracle instances in the RAC share the same disk storage, the database objects created in step 6 will be visible from all other nodes in the RAC. |
appsGroupSpaceDataSource
) with multi-data sources pointing to your Oracle RAC. p13nDataSource
, create physical data sources p13nDataSource-1
to p13nDataSource-N
, each pointing to one RAC node. Use the WebLogic Server Administration Console to create these data sources.
Alternatively, you could create them by copying and updating the sample jdbc.xml
files in the WL_HOME/portal/db/jdbc/oracle_thin
directory following the steps below:
1) Copy the dataSourceName-jdbc.xml
file to DOMAIN_HOME/config/jdbc
directory, and name it dataSourceName-n-jdbc.xml
, where n is the sequence number of the n-th RAC node.
2) Edit the file dataSourceName-n-jdbc.xml
. Replace @DB_USER@
, @DB_USER_PASSWD@
, @DB_HOST@
, @DB_PORT@
and @DB_NAME@
. For @DB_HOST@
and @DB_NAME@
, use the hostname and SID of the n-th RAC node.
3) Edit config.xml
to add this newly created JDBC data source as a JDBC system resource.
p13nDataSource
multi-data source which includes p13nDataSource-1
to p13nDataSource-N
created above.
If you use the WebLogic Server Administration Console, you would need to first remove the existing data source with the same name, and then create the multi-data source. Also, since the WebLogic Server Administration Console does not provide a way to configure the value of global-transaction-protocol attribute for a multi-data source, you need to manually add the attribute into the corresponding jdbc.xml
later.
Alternatively, you could manually edit the corresponding jdbc.xml
following the steps below:
1) Open the corresponding jdbc.xml
file, delete the jdbc-driver-params
element and the jdbc-connection-pool-params
element, including all their children elements:
2) Between the jndi-name
and the global-transactions-protocol
elements, add the following two elements. Determine the value of algorithm-type from Table . The value of data-source-list is a comma-separated list of all the underlying physical data sources.
<algorithm-type>Load-Balancing</algorithm-type>
<algorithm-type>Failover</algorithm-type>
<data-source-list>portalDataSourceAlwaysXA-1,
portalDataSourceAlwaysXA-2 </data-source-list>
build.xml
, oraracconf.py
and oraracconf.py.properties
provide an example of how to configure an existing WebLogic Portal domain to point to an Oracle RAC database. These files are listed in Sample WLST Scripts. To use the sample, follow the steps below:
1) Download these files into your DOMAIN_HOME
directory.
2) Open the file oraracconf.py.properties
. Edit the values in the "Database usernames and passwords" and the "ORACLE RAC configuration" sections to reflect your Oracle RAC environment.
3) Open a command prompt, change current directory to DOMAIN_HOME/bin
. Execute the following script:
<?xml version="1.0" encoding="UTF-8"?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90">
<name>p13nDataSource</name>
<jdbc-data-source-params>
<jndi-name>p13n.trackingDataSource</jndi-name>
<jndi-name>p13n.sequencerDataSource</jndi-name>
<jndi-name>cm.sequencerDataSource</jndi-name>
<jndi-name>p13n.leasemanager</jndi-name>
<jndi-name>p13n.dataSyncDataSource</jndi-name>
<jndi-name>p13n.entitlementsDataSource</jndi-name>
<jndi-name>p13n.quiescenceDataSource</jndi-name>
<algorithm-type>Load-Balancing</algorithm-type>
<data-source-list>p13nDataSource-1,p13nDataSource-2</data-source-list>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
<?xml version="1.0" encoding="UTF-8"?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90">
<name>p13nDataSource-1</name>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@rnhp380-c11-23-vip:1521:DBSRAC101</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>WEBLOGIC_8</value>
</property>
</properties>
<password-encrypted>{3DES}cIUMOgs5Divb+UWlIFgSoA==</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>5</initial-capacity>
<max-capacity>20</max-capacity>
<capacity-increment>1</capacity-increment>
<test-connections-on-reserve>true</test-connections-on-reserve>
<test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>p13nDataSource-1</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
<?xml version="1.0" encoding="UTF-8"?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90">
<name>p13nDataSource-2</name>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@rnhp380-c11-25-vip:1521:DBSRAC102</url>
<driver-name>oracle.jdbc.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>WEBLOGIC_8</value>
</property>
</properties>
<password-encrypted>{3DES}cIUMOgs5Divb+UWlIFgSoA==</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>5</initial-capacity>
<max-capacity>20</max-capacity>
<capacity-increment>1</capacity-increment>
<test-connections-on-reserve>true</test-connections-on-reserve>
<test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>p13nDataSource-2</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
![]() ![]() ![]() |