Oracle® Fusion Middleware Database Administration Guide for Oracle WebLogic Portal 10g Release 3 (10.3.2) Part Number E14233-01 |
|
|
View PDF |
This chapter describes the steps necessary to use a MySQL 5.0 database with WebLogic Portal, and includes the following sections:
Section 6.2, "Configuring the Main WebLogic Portal Database"
Section 6.3, "Manually Creating a Separate Database and Database Objects for Behavior Tracking"
Review this entire chapter and any release notes before proceeding. The tasks described in this chapter should be performed by a database administrator.
Before proceeding, read Section 2.1, "Overview of Enterprise-Quality Database Configuration for WebLogic Portal."
Caution:
The MySQL JDBC driver is not fully XA compatible, therefore WebLogic Portal does not support using the com.mysql.jdbc.jdbc2.optional.MysqlXADataSource. Data sources that require XA and those that are XA capable should use the com.mysql.jdbc.Driver with the global-transactions-protocol LoggingLastResource instead.The database creation scripts install domain-specific tables. You should 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 MySQL instance (for example, if you want to run development and system test from a single MySQL installation). Any additional content management repositories require a separate database user.
To configure a MySQL database:
Back up your database environment before installing any new database objects. See your database documentation for details.
Review the provided sample scripts, located in the <WLPORTAL_HOME>/portal/db/mysql/admin
directory. See Section 6.4, "Database Scripts and Usage Notes" and the comments in the scripts for additional information.
Copy and modify the sample scripts appropriately for your environment to create each of the following database schemas:
Follow the steps in Section 6.2, "Configuring the Main WebLogic Portal Database" to create the main WebLogic Portal user and database objects.
If you want to create a separate behavior tracking database, follow the steps in Section 6.3, "Manually Creating a Separate Database and Database Objects for Behavior Tracking."
Perform the following steps to configure the main WebLogic Portal database:
Copy the create_database.sql
script and modify it appropriately for your environment. See Section 6.4, "Database Scripts and Usage Notes" and the comments in the script for additional information. For more information on character sets, see Section 3.2.3, "Choosing Character Sets and Sort Orders."
Run the modified create_database.sql
script as a user with user account creation privileges (normally the root user). For example, from mysql
:
mysql -uroot --password=password <create_database.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 Oracle Fusion Middleware Creating Domains Using the Configuration Wizard.
Open your domain's database.properties
file for edit.
Set database=mysql
.
Update the following settings (by replacing the @ symbols and the text between the symbols with the correct values) for your main WebLogic Portal database:
mysql.user=@DB_USER@ mysql.password=@DB_PASSWORD@ mysql.url=jdbc:bea:mysql://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
Create the database objects.
Navigate to the <MW_HOME>\user_projects\domains\myPortalDomain
directory.
Enter one of the commands:
On Windows, double-click create_db.cmd
.
On UNIX, run 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 Section 3.8, "Note About Creating or Refreshing Database Objects" for detailed information.Replace the JDBC data sources in your domain, which point to PointBase by default, with data sources that point to MySQL. 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 MySQL are available in the <WLPORTAL_HOME>\portal\db\jdbc\mysql
directory. Follow the instructions in the <WLPORTAL_HOME>\portal\db\jdbc\README.txt
file.
Note:
Do this while WebLogic Server is stopped.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 Oracle Fusion Middleware Interaction Management Guide for Oracle WebLogic Portal.
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:
Modify the bt_create_database.sql
file for your environment, as indicated in the instructions contained in the scripts and in Section 6.4, "Database Scripts and Usage Notes."
Run bt_create_database.sql
as a user with system administrator privileges. For example, from osql
:
mysql -uroot --password=password <bt_create_database.sql
Navigate to the appropriate database directory based on your environment: <WLPORTAL_HOME>\portal\db\mysql
Connect as the user WEBLOGIC_EVENT
and run the following scripts:
bt_create_tables.sql
bt_create_fkeys.sql
bt_create_indexes.sql
bt_create_triggers.sql
Run the following scripts from the path <WLPORTAL_HOME>\portal\db\data\required
:
bt_insert_system_data.sql
bt9_insert_system_data.sql
Use the WebLogic Server Administration Console to configure a non-XA JDBC data source to access your behavior tracking database. Associate the JNDI name 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 MySQL database and create WebLogic Portal objects in that database.
Table 6-1 Database Scripts and Usage Notes
Script Name | Description |
---|---|
create_database.sql |
Creates a database. You must create a main WebLogic Portal database. Make a copy of this script and edit it to replace Typical names for the main WebLogic Portal database are:
When you run the script with these values, it creates the Note: If you decide to create an additional content management repository, you must create a database with different user names for it. For additional information, see the Oracle Fusion Middleware Content Management Guide for Oracle WebLogic Portal. |
bt_create_database.sql |
Creates the Following are the default names:
|