Skip navigation.

Database Administration Guide

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Property Files and Database Scripts

 


The db_settings.properties file

Database scripts use the db_settings.properties file for these purposes: to connect to the database; to drop, create, or alter database objects; and for data inserts.

The db_settings.properties file exists in any domain directory that contains Portal, including Portal upgrade directories that contain a database upgrade script.

The database scripts (for example, create_db.cmd and upgrade_db_schema_to_ 81SP4.sh) use the db_settings.properties file that is located in the same directory from which you start the script.

Definitions Section

In the first section of the file the domain, modules, and object actions are defined. For more information on the Portal modules and their uses, see WebLogic Portal DDL Modules.

Do not edit this section of the file. Removing modules is not recommended or supported, due to object dependencies.

domain_name=portalDomain
p13n_modules=p13n au bt ds er
portal_modules=cm cmv wlcs wps collaboration sample_cm
netuix_modules=pf wsrp
drop_actions=drop_views drop_fkeys drop_indexes drop_constraints drop_tables
create_actions=create_tables create_fkeys create_indexes create_views create_triggers

Database Parameters

Use the database parameters section of the file to define the database that you plan to use with WebLogic Portal. By default, the PointBase section is active. To use another database, place and remove comment characters as needed to activate the appropriate section of the file, and edit the parameter values for your environment.

For example, the PointBase and Oracle sections of the properties file are included below:

#------PointBase--------------------------------
#@IF_USING_POINTBASE@
database=POINTBASE
db_version=44
jdbcdriver=com.pointbase.jdbc.jdbcUniversalDriver
host=localhost
db_name=workshop
port=9093
dblogin=WEBLOGIC
dbpassword=WEBLOGIC
connection=jdbc:pointbase:server://localhost:9093/workshop
pointbase_ini=pointbase/pointbase.ini
#@ENDIF_USING_POINTBASE@
#
#------Oracle---------------------------------#
#
#@IF_USING_ORACLE@
#database=ORACLE
#db_version=817
#server=@ORACLE_NET_SERVICE_NAME@
#dblogin=@ORACLE_USER@
#dbpassword=@ORACLE_PASSWORD@
#@ENDIF_USING_ORACLE@

 


Scripts to Create or Upgrade Databases

WebLogic Portal database objects are created by running a create_db.cmd/.sh script from a domain directory or by using "Load Database" from the Configuration Wizard.

WebLogic Portal database upgrades for Service Packs are applied using one of the following scripts. See the Upgrade Guide for details on upgrading to a specific Service Pack.

Upgrading from 7.0 to 8.1 GA

WL_HOME\portal\db\upgrade_db_schema_to_81.cmd/.sh

Upgrading from 8.1 GA or SP2 to 8.1 SP3

WL_HOME\portal\db\SP3\upgrade_db_schema_to_81SP3.cmd/.sh

Upgrading from 8.1 SP3 to 8.1 SP4

WL_HOME\portal\db\SP4\upgrade_db_schema_to_81SP4.cmd/.sh

The scripts listed above call scripts residing in the WL_HOME\portal\db directory. With the exception of the default PointBase database, each database requires that a database client be installed and configured prior to script execution.

The following scripts located in WL_HOME\portal\db are called by the create_db.cmd/.sh scripts as well as the upgrade_db_schema_to_<81version> scripts. These scripts are not meant to be run independently. They are meant to be called by a create_db.cmd/.sh script or an upgrade_db_schema_to_<81version> script.

create_db_common.cmd/sh

This is a driver script that, depending on the database that is uncommented in db_settings.properties, calls other common and database-specific scripts.

create_tmp_ddl.cmd/sh

Called by create_db_common.cmd/.sh to read the various DDL modules (.sql files) for the appropriate database and database version, and to create tmp*.sql files (where *=Create, CreateUser, Drop, Insert) for building and populating database objects. Each module defined in db_settings.properties is looped through for files prefixed with a modules prefix and suffixed by a drop_actions, create_actions and alter_actions suffix to populate tmp*.sql files.

For a list of DDL modules, see WebLogic Portal DDL Modules.

create_<your_database>.cmd/sh

where <your_database> has a value of: pointbase, db2, ms_sql, oracle, or sybase.

Connects to the database based on parameters set in db_settings.properties. The connection is performed using database client software. The tmp*.sql files created with create_tmp_ddl.cmd/.sh are processed to define database objects.

db_version.properties

Although this file has a type of .properties, it is not intended to be edited; the scripts use this file to identify the database version number directory from which the .sql DDL files are read. In the case of Oracle 8.1.7 and Oracle 9i, the same .sql files from the WL_HOME\portal\db\oracle\817 directory are used for both database versions.

create_stats

Reads .sql scripts from WL_HOME\portal\db\<database>\<database_ version>\admin and updates database optimizer statistics. Output is written to the file statistics.log. An installation report based on .sql scripts in the admin directory is also created. Statistics and the installation report are run for all databases except PointBase.

load_data.cmd/sh

This script is called by create_db_common.cmd/.sh, but it is not used to insert any data into database tables. If a loadsampledata.properties existed in the domain directory, this script would invoke the database loader and use its information to insert sample data into database tables.

Output from the create_db.cmd/.sh script is written to a create_db.log file in the directory from which the script is executed. Output from the upgrade_db_schema_to_<81version> scripts is written to upgrade_db_schema_to_<81version>.log.

 

Back to Top Previous Next