Skip Headers
Oracle® Fusion Middleware Database Administration Guide for Oracle WebLogic Portal
10g Release 3 (10.3.4)

Part Number E14233-02
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

A Scripts and Properties Files

This appendix describes the SQL scripts and properties files that specify the settings for database creation and upgrade, and perform Database Definition Language (DDL) commands for WebLogic Portal and personalization data structures. It includes the following sections:

A.1 WebLogic Portal DDL Modules

WebLogic Portal DDL modules (SQL scripts) are provided in the following directories:

<WLPORTAL_HOME>\portal\db\db2
<WLPORTAL_HOME>\portal\db\mysql
<WLPORTAL_HOME>\portal\db\oracle
<WLPORTAL_HOME>\portal\db\derby
<WLPORTAL_HOME>\portal\db\sql_server
<WLPORTAL_HOME\portal\db\sybase

Each of these directories, except for derby, has an admin subdirectory, which contains the scripts that create the database user or database, and the appropriate database objects (such as tablespaces, bufferpools, and so on, depending on the database requirements).

Insert commands for bootstrap data that must be inserted into tables in each WebLogic Portal database are provided in the following directory:

<WLPORTAL_HOME>\portal\db\data\required\xx_insert_system_data.sql

WebLogic Portal DDL is provided in files named as follows:

xx_create_fkeys.sql
xx_create_indexes.sql
xx_create_tables.sql 
xx_create_triggers.sql 
xx_create_views.sql 
xx_drop_constraints.sql 
xx_drop_fkeys.sql 
xx_drop_indexes.sql 
xx_drop_tables.sql 
xx_drop_views.sql 

In these file names, xx is one of the prefixes listed Table A-1.

Table A-1 WebLogic Portal DDL Module File Prefixes

Prefix Description

au

Anonymous user

comm

Communities

dep9

Deprecated Collaboration portlets

pf, pf9, pf10, and pf102

Framework and localization

wps

WebLogic Portal Services


The scripts with a 10 suffix contain new and updated DDL for WebLogic Portal 10.0. Scripts with a 102 suffix contain new and updated DDL for WebLogic Portal 10.2.

A.2 Content Management DDL Modules

Content Management DDL modules (SQL scripts) are provided in the following directories:

<WLPORTAL_HOME>\content-mgmt\db\db2
<WLPORTAL_HOME>\content-mgmt\db\mysql
<WLPORTAL_HOME>\content-mgmt\db\oracle
<WLPORTAL_HOME>\content-mgmt\db\derby
<WLPORTAL_HOME>\content-mgmt\db\sql_server
<WLPORTAL_HOME>\content-mgmt\db\sybase

Insert commands for bootstrap data that must be inserted into tables in each content management database are provided in the following directory:

<WLPORTAL_HOME>\content-mgmt\db\data\required\xx_insert_system_data.sql

Content Management DDL is provided in files named as follows:

xx_create_fkeys.sql
xx_create_indexes.sql
xx_create_tables.sql 
xx_create_triggers.sql 
xx_drop_constraints.sql 
xx_drop_fkeys.sql 
xx_drop_indexes.sql 
xx_drop_tables.sql 

In these file names, xx is one of the prefixes listed Table A-2.

Table A-2 Content Management DDL Module File Prefixes

Prefix Description

cm, cm9, cm10, and cm102

Content management

cmv and cmv9

Content management


Tip:

The scripts with a 10 suffix contain new and updated DDL to Content Management for WebLogic Portal 10.0. Scripts with a 102 suffix contain new and updated DDL to Content Management for WebLogic Portal 10.2.

A.3 Personalization DDL Modules

Personalization DDL modules (SQL scripts) are provided in the following directories:

<WLPORTAL_HOME>\p13n\db\db2
<WLPORTAL_HOME>\p13n\db\mysql
<WLPORTAL_HOME>\p13n\db\oracle
<WLPORTAL_HOME>\p13n\db\derby
<WLPORTAL_HOME>\p13n\db\sql_server
<WLPORTAL_HOME>\p13n\db\sybase

Insert commands for bootstrap data that must be inserted into tables in each personalization database are provided in the following directory:

<WLPORTAL_HOME>\p13n\db\data\required\xx_insert_system_data.sql

Personalization DDL is provided in files named as follows:

xx_create_fkeys.sql
xx_create_indexes.sql
xx_create_tables.sql 
xx_create_triggers.sql 
xx_drop_constraints.sql 
xx_drop_fkeys.sql 
xx_drop_indexes.sql 
xx_drop_tables.sql 

In these file names, xx is one of the prefixes listed Table A-3.

Table A-3 Personalization DDL Module File Prefixes

Prefix Description

bt

Behavior tracking

dep9

Deprecated WebLogic Portal RDBMS Authenticator

er

Visitor entitlements and delegated administration

p13n, p13n9, and p13n102

Users, groups, and user profiles

seq

Sequencer


Tip:

There are no DDL changes to personalization for WebLogic Portal 10.0. Scripts with a 102 suffix contain new and updated DDL to Personalization for WebLogic Portal 10.2.

A.4 Using the database.properties File

Database scripts use the database.properties file for the following purposes:

You can find the database.properties file in any domain directory that contains WebLogic Portal. Database scripts, such as create_db.cmd and create_db.sh, use the database.properties file that is located in the same directory from which you start the script.

A.4.1 Setting the Database Parameters in the Properties File

Use the database.properties file to specify the database you plan to use with WebLogic Portal.

The following is the section in the file where you choose your database vendor.

# Set database= to a valid database.                                   
# Valid databases are:  derby, oracle, sql_server, sybase and db2
#----------------------------------------------------------------------
database=derby

In addition to modifying the database name, you must specify the appropriate values for the database user, password, host, and so on. You can use an encrypted password, as described in Section 3.1, "Encrypting Passwords." The following shows the Derby and Oracle sections of the properties file.

#----------------------------------------------------------------------
#  For the database specified above, fill in the appropriate @DB_USER@ 
#  and @DB_PASSWORD@ settings and complete the url parameters by 
#  setting:  @DB_HOST@, @DB_PORT@, @DB_NAME@
#  Note: @DB_NAME@ for sql_server and sybase is often the same as user 
#
#  To use an encrypted password for any database use:
#    weblogic.security.Encrypt to obtain the encrypted password.
#  The saltFile used to encrypt/decrypt passwords is the domains
#    <DOMAIN_HOME>/security/SerializedSystemIni.dat saltFile.
#  
#----------------------------------------------------------------------
derby.user=WEBLOGIC
derby.password=WEBLOGIC
derby.driver=com.derby.jdbc.jdbcUniversalDriver
derby.url=jdbc:derby:server://localhost:9093/weblogic_eval
#----------------------------------------------------------------------
oracle.user=@DB_USER@
oracle.password=@DB_PASSWORD@
oracle.driver=weblogic.jdbc.oracle.OracleDriver
oracle.url=jdbc:bea:oracle://@DB_HOST@:@DB_PORT@;SID=@DB_NAME@
#----------------------------------------------------------------------
You can specify a log file other than the default.
#----------------------------------------------------------------------
# logFile= the file that output will be logged to
#----------------------------------------------------------------------
logFile=create_db.log
The files= setting indicates which SQL scripts to execute. The default setting is appropriate for creating the main WebLogic Portal database.
#----------------------------------------------------------------------
# files= points to the jdbc.index files, which points to the .sql 
#   files, to be executed by create_db                                  
#----------------------------------------------------------------------
files=${env.WEBLOGIC_HOME}/common/p13n/db/${database}/jdbc_index/ jdbc.index, ${env.WLP_HOME}/db/${database}/jdbc_index/jdbc.index

You can also change the debug setting or send all SQL to a file rather than executing it, as described in the comments in the properties file. You can then execute the SQL file against the database.

A.5 Scripts to Create an Additional Content Management Repository

If you need to create an additional content management repository, use create_db.cmd/.sh command with the cmrepo_database.properties file. For more information, see the Oracle Fusion Middleware Content Management Guide for Oracle WebLogic Portal.

A.6 Scripts to Manually Upgrade from Previous Versions

If you did not use the WebLogic Upgrade Wizard to perform the database upgrade a previous version, you must upgrade manually. See the Oracle Fusion Middleware Upgrade Guide for Oracle WebLogic Portal for details on the upgrade process.

A.7 Scripts to Drop Deprecated Compoze Database Tables

After you have upgraded to version 10.0, you can drop the tables associated with Compoze (Collaboration). See the Oracle Fusion Middleware Upgrade Guide for Oracle WebLogic Portal for instructions.

A.8 Scripts to Drop Deprecated RDBMS Authenticator Tables

If you do not upgrade your user store using the WebLogic Upgrade Wizard during the domain upgrade process, you can perform a manual upgrade later.

After you have upgraded to the WebLogic SQL Authenticator, you can drop the tables associated with the WebLogic Portal RDBMS Authenticator.

See the Oracle Fusion Middleware Upgrade Guide for Oracle WebLogic Portal for instructions.