This chapter describes the steps necessary to use a DB2 database with WebLogic Portal, and includes the following sections:
Review this entire chapter and any release notes before proceeding. The tasks in this chapter should be performed by a database administrator.
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 schemas are required if you have multiple domains, or to run multiple environments using the same DB2 instance (for example, if you want to run development and system test from a single DB2 installation). GroupSpace requires a separate user, as do any additional content management repositories.
Note: | To ensure that portal applications run correctly on DB2, you must set some minimum configuration parameters. If you do not, heavy portal activity might exceed database capacity. Use the following settings as guidelines to configure your DB2 database: |
WL_HOME
/portal/db/oracle/admin
directory. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the scripts for additional information.
To configure the main WebLogic Portal database, follow these steps:
create_bufferpool.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.Db2 connect to
database
user
username
password
password
create_bufferpool.sql
. For example, from the CLP:Db2 -tf create_bufferpool.sql -v
create_temp_tablespace.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.create_temp_tablespaces.sql
. For example, from the CLP:Db2 -tf create_temp_tablespaces.sql -v
create_tablespace.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.create_tablespaces.sql
. For example, from the CLP:Db2 -tf create_tablespaces.sql -v
create_users.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.create_user.sql
. For example, from the CLP:Db2 -tf create_user.sql -v
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=db2
.db2.user=@DB_USER@
db2.password=@DB_PASSWORD@
db2.url=jdbc:bea:db2://@DB_HOST@:@DB_PORT@;DatabaseName=@DB_NAME@
BEA_HOME
\user_projects\domains\
myPortalDomain directory.create_db.cmd
.create_db.sh
.
If any error messages are displayed, check the create_db.log
file for additional information.
Note: | After running create_db script, you need to update the database administrator password. See Note About Creating or Refreshing Database Objects for detailed information. |
appsGroupSpaceDataSource
), which point to PointBase by default, with data sources that point to DB2. 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, db2_bea
. Follow the instructions in the WL_HOME
\portal\db\jdbc\README.txt
file.
To configure the GroupSpace database, follow these steps:
create_bufferpool.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.Db2 connect to
database
user
username
password
password
create_bufferpool.sql
. For example, from the CLP:Db2 -tf create_bufferpool.sql -v
create_temp_tablespace.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.create_temp_tablespaces.sql
. For example, from the CLP:Db2 -tf create_temp_tablespaces.sql -v
create_tablespace.sql
script and modify it appropriately for your environment. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.create_tablespaces.sql
. For example, from the CLP:Db2 -tf create_tablespaces.sql -v
create_users.sql
script and modify it appropriately for your environment and the GroupSpace settings. See
Table 9-1, Database Scripts and Usage Notes, on page 9-8 and the comments in the script for additional information.create_user.sql
. For example, from the CLP:Db2 -tf create_user.sql -v
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=db2
. db2.user=@DB_USER@
db2.password=@DB_PASSWORD@
db2.url=jdbc:bea:db2://@DB_HOST@:@DB_PORT@;DatabaseName=@DB_NAME@
BEA_HOME
\user_projects\domains\
myPortalDomain directory.create_db.cmd -database.properties=groupspace_database.properties
create_db.sh -database.properties=groupspace_database.properties
If any error messages are displayed, check the create_db_groupspace.log file for additional information.
Note: | After running create_db script, you need to update the database administrator password. See Note About Creating or Refreshing Database Objects for detailed information. |
appsGroupSpaceDataSource
JDBC data source (which points to PointBase by default) with a data source that points to DB2. 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 db2_bea
. 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, as indicated in the instructions contained in the scripts and in
Table 9-1, Database Scripts and Usage Notes, on page 9-8.bt_create_tablespaces.sql
script. For example:
Db2 -tf bt_create_tablespaces.sql -v
bt_create_users.sql
script. For example:
Db2 -tf bt_create_users.sql -v
WL_HOME
\portal\db\db2
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 9-1 describes the scripts that enable you to configure the Oracle database and create WebLogic Portal objects in that database.
Because IBM DB2 databases authenticate users using the operating system, you must create an operating system user that owns database schema objects.
|
|||||||
Creates 4K and 8K regular tablespaces. If you want to use existing regular tablespaces of the correct sizes, 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 an 8K temporary tablespace. If you want to use an existing temporary tablespace of the correct size, 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 the
WEBLOGIC_EVENT schema owner user and grants DB2 createtab , bindadd , and connect privileges to the schema owner user.
|