Skip navigation.

Database Administration Guide

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

Using a Sybase Database

This section describes the steps necessary to use a Sybase database with WebLogic Portal 8.1, and includes information on the following subjects:

Typically, the steps in this chapter are performed by a database administrator.

Note: Review this entire chapter and any release notes before proceeding.

 


Understanding Database Configuration for WebLogic Platform

Typically, you use the WebLogic Configuration Wizard to configure and connect to the database that you will use to support WebLogic Platform. For more information about how to use the WebLogic Configuration Wizard, see http://download.oracle.com/docs/cd/E13196_01/platform/docs81/confgwiz/index.html.

When using the Configuration Wizard to configure databases for use with WebLogic Platform, use the following steps.

  1. Create your vendor database(s). If you want to use behavior event tracking in a production environment, consider using a separate database for behavior event tracking.

Note: If you are creating a separate database for behavior event tracking, see Creating a Database for Behavior Tracking Events on page 4-8.

  1. Prepare the database for use with WebLogic Platform. BEA provides several sample initialization scripts that need to be modified and run on the vendor database before using the database with WebLogic Platform.
  2. After the database is configured, use the Configuration Wizard to create and load appropriate database objects and set JDBC driver settings at domain creation time.

Manually Configuring Databases

In some cases, you may wish to manually configure the database or manually modify your existing settings. For example, manual configuration should be used in the following cases:

Use the following steps when you need to manually configure a database.

  1. Create your vendor database(s),see page 4-3. If you want to use behavior event tracking in a production environment, consider using a separate database for behavior event tracking.
  2. Prepare the database for use with WebLogic Platform, see page 4-3. BEA provides several sample initialization scripts that need to be modified and run on the vendor database before using the database with WebLogic Platform.
  3. Create database objects, see page 4-6. This creates proprietary database objects that are used by WebLogic. This is done by editing the database properties file provided by BEA.
  4. Configure the JDBC settings for your database using WebLogic Console Server, see page 4-7.

 


Configuring a Sybase Database

Before following the steps outlined in this chapter, you need to have already defined your Sybase instance. Note the following when defining your Sybase instance.

  1. Install the Sybase client software on the WebLogic Platform host and do the following:
    1. Configure it connect to the target Sybase instance.
    2. Verify that you can connect to the target instance via isql. For example,
    3. isql -Usa -Ppassword -SMySybase

  2. Prepare the Sybase database. The database creation scripts install domain-specific tables. You should work with your database administrator to adjust the SAMPLE scripts, and to create the database schema owner users and tablespaces needed for your environment.

Notes: Multiple databases are required if you have multiple domains, or to run multiple environments using the same SQL Server instance (for example, if you want to run development and system test from a single SQL Server installation).

Be sure to back up your database(s) before installing any new database objects. See your database documentation for details.

    1. Review and modify the provided sample scripts to suit your environment. These scripts are provided in WL_HOME/portal/db/sybase/125/admin.

      Script Name

      Description

      create_devices.sql

      Create database devices.

      Usage Notes: Database devices must be created by a user with system administrator privileges (normally the 'sa' user). "D:\DATAFILE" and "E:\LOGFILE" specifications in this script must be changed to reflect valid disk locations for your environment. Optimally, data and log devices would be placed on separate physical disks, which reside on separate controllers. Edits are required to change file sizes and device names.

      The following default names are used:

      • data device: WEBLOGIC_DATA

      • log device: WEBLOGIC_LOG

      create_database.sql

      Create the database and login. An alias is added to the dbo (database owner user) of the database. The devices created by create_devices.sql are used.

      Usage Notes: Edits are required to reflect name or size changes from create_devices.sql. Edits are required to change the default database name and/or database owner user.

      The following defaults are used:

      • data device: WEBLOGIC_DATA

      • log device: WEBLOGIC_LOG

      • database name: WEBLOGIC

      • database owner user: WEBLOGIC

      • password: WEBLOGIC

      If the database you are creating is a development database your database administrator may want to uncomment and set the "truncate log on checkpoint" database option.

      If your application will use WebLogic Workshop page flows or RowSet controls uncomment and set the 'DDL in transaction' to true option to true to allow database table create commands to work properly.

      statistics_build.sql

      Builds statistics.sql to update table and index statistics for the database optimizer. Statistics should be should be updated whenever any significant changes in database data occurs. Your database administrator should schedule update statistics to run periodically in your environment.

      install_report_build.sql

      install_report_static.sql

      Builds an informational installation report about the database objects created by the WEBLOGIC user.

      bt_create_devices.sql

      Creates behavior tracking database devices.

      Usage Notes: Database devices must be created by a user with system administrator privileges (normally the 'sa' user). "D:\DATAFILE" and "E:\LOGFILE" specifications in this script must be changed to reflect valid disk locations for your environment. Optimally, data and log devices would be placed on separate physical disks, which reside on separate controllers. Edits are required to change file sizes and device names.

      The following default names are used:

      • data device: WEBLOGIC_EVENT_DATA

      • log device: WEBLOGIC_EVENT_LOG

      bt_create_database.sql

      Create the WEBLOGIC_EVENT database and WEBLOGIC_EVENT database owner user login. An alias is created to make WEBLOGIC_EVENT dbo (database owner user) in the database.

      Usage Notes: Edits are required to change database names, database owner user and password. Edits are required to reflect valid disk locations for DATA and the LOG devices, or to adjust file sizes. DATA and LOG files should be placed on separate physical disks and away from any system database files.

      The following defaults are used:

      • data device: WEBLOGIC_EVENT_DATA

      • log device: WEBLOGIC_EVENT_LOG

      • database name: WEBLOGIC

      • database owner user: WEBLOGIC

      • password: WEBLOGIC

    2. Run create_devices.sql as a user with system administrator privileges. For example,

    isql -Usa -SMYSYBASE -e -icreate_devices.sql -ocreate_devices.log

    1. Run create_database.sql via isql as a user with System Administrator privileges (i.e. the sa user).

    isql -Usa -SMYSYBASE -e -icreate_database.sql -ocreate_database.log

    Output from the above is written to the file specified after the "-o" parameter. The log file is stored in the same directory that the script resides. Verify that each log file contains no errors for database object creation.

    1. Statistics and install report scripts will be run automatically by the create_db.cmd/.sh scripts. Ensure that your database administrator schedules update statistics to be run periodically for your WebLogic Portal database.

 


Creating Database Objects

To create WebLogic Platform database objects, use the following steps:

  1. Verify that you can connect to the target database. Use the following command syntax to verify that you can connect to the target database server using the default schema owner user created by running create_database.sql.
  2. isql -UWEBLOGIC -SMYSYBASE

  3. Open your domain's db_settings.properties file for edit and comment out the database setting for PointBase.
  4. Uncomment the database settings for your new target database and update the following settings for your database:
    • server=
    • dblogin=
    • password=
  5. Initialize the database with the new settings.
    1. Navigate to the <BEA_HOME>\user_projects\domains\portalDomain directory, and double-click on the create_db.cmd file.
    2. Verify the results in the db.log file.

Note: If you are using the sample domain, run the create_db.cmd/sh file from the following directory: <WL_HOME>\samples\domains\portal.

 


Configuring Your Domain's JDBC Driver Settings

Note: These settings do not allow support for XA functionality. For instructions on enabling XA, see XA Support..

  1. Start the WebLogic Server for your domain.
  2. Log on to the WebLogic Server Console.
  3. Configure your new connection pools.
    1. Go to Services -> JDBC -> Connection Pools.
    2. Click Configure a new Connection Pool.
    3. Select the appropriate Database Type and Non-XA Database Driver from the drop down list boxes and click Continue. See the Supported Configurations documentation for JDBC drivers supported by WebLogic Platform, http://download.oracle.com/docs/cd/E13196_01/platform/docs81/support/supp_plat.html#1085671.
    4. Choose a name for the new Connection Pool (For example: cgPoolN) and fill in the blanks for your vendor database. Click Continue.
    5. Test your connection to verify that you can successfully connect to your database.
    6. Create and deploy your new Connection Pool.
  4. Update your data sources.
    1. From Services -> JDBC -> Data Sources, click on each data source and switch each to the newly created connection pool. Be sure to apply each change.
    2. Verify that each Data Source is changed by clicking on Data Sources and then verifying that Pool Name has been set to the new Connection Pool for each.
  5. From Services -> JMS -> Stores -> cgJMSStore, switch cgJMSStore to use the new Connection Pool.
  6. Stop your domain's WebLogic Server, then restart it.
  7. In WebLogic Server Console, delete the original cgPool connection pool.
    1. Go to Services -> JDBC -> Connection Pools.
    2. Right-click on the cgPool connection pool and select Delete.

 


Creating a Database for Behavior Tracking Events

You may want to store behavior tracking events in a different location than other WebLogic Portal database objects for increased performance. For more information about behavior tracking, see http://download.oracle.com/docs/cd/E13218_01/wlp/docs81/adminportal/help/SA_BehavTrackServ.html.

Note: By default, behavior tracking database objects are created in the same database as other WebLogic Portal database objects. You only need to following these steps if you are configuring a separate database for behavior tracking events.

  1. Verify that you can connect to the target Sybase instance, see step 1. in Manually Configuring Databases.
  2. Run bt_create_devices.sql via isql as a user with system administrator privileges. For example,
  3. isql -Usa -SMYSYBASE -e -ibt_create_devices.sql -obt_create_devices.log

  4. Run bt_create_database.sql via isql as a user with system administrator privileges (i.e. the sa user).
  5. isql -Usa -SMYSYBASE -e -ibt_create_database.sql -obt_create_database.log

  6. Open your domain's db_settings.properties file for edit.
    1. Within the db_settings.properties file, uncomment the database settings for your new target database and update the following settings for your database:
    • server=<SERVER_NAME>
    • dblogin=WEBLOGIC_EVENT
    • password=WEBLOGIC_EVENT
  7. Within the db_settings.properties file, find the p13n_modules, portal_modules and netuix_modules lines at the top of the file.
    1. Copy these 3 lines and comment out the original settings by adding a # sign.
    2. Replace the original settings as follows:
    • Replace p13n_modules=p13n au bt ds with p13n_modules=bt.
    • Replace portal_modules=cm wlcs wps collaboration sample_cm with portal_modules=
    • Replace netuix_modules=pf with netuix_modules=.
    • When you are finished, the section should look like this:

      #p13n_modules=p13n au bt ds

      #portal_modules=cm wlcs wps collaboration sample_cm

      #netuix_modules=pf

      p13n_modules=bt

      portal_modules=

      netuix_modules=

    1. Save the changes to the db_settings.properties file.
  8. Initialize the database with the new settings.
    1. Navigate to the \\<BEA_HOME>\user_projects\domains\portalDomain directory, and double-click on the create_db.cmd file.
    2. Verify the results in the db.log file.

Note: If you are using the sample domain, run the create_db.cmd file from the following directory: \\<WL_HOME>\samples\domains\portal.

  1. Configure a connection pool to access your behavior tracking database and associate the p13n_tracking. Follow the steps in Configuring Your Domain's JDBC Driver Settings on page 4-7.

 

Skip navigation bar  Back to Top Previous Next