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 Microsoft SQL Server Database

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

Review this entire chapter and any release notes before proceeding. The steps in this chapter should be performed by a database administrator

 


Configuring a Microsoft SQL Server Database

Before proceeding, be sure you have read Overview of Database Configuration for WebLogic Portal on page 1-1.

To configure a SQL Server database:

  1. Install the SQL Server client on the WebLogic Platform host and do the following:
    1. Configure it for access to your SQL Server database.
    2. Ensure that you can connect to your SQL Server database via the OSQL utility.
    3. See your SQL Server documentation for details.

Note: If you plan to use the Configuration Wizard to create the database objects for a new domain, you will not need to install the SQL Server Client.

  1. Verify that security authentication settings for the SQL Server are set to "SQL Server and Windows."
    1. From Enterprise Manager, right-click on the desired SQL Server.
    2. Select Properties, then select the Security tab.
    3. Under authentication, ensure that SQL Server and Windows is selected.
  2. Prepare the SQL Server Database. The database creation scripts will install domain-specific tables. It is recommended that you work with a SQL Server system or database administrator to adjust the SAMPLE scripts and create database devices, databases, and database users for your SQL Server 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 available in: <WL_HOME>\portal\db\sql_server\2000\admin.

    The following table lists the script names and the usage notes for each script.

    Script Name

    Description

    create_database.sql

    Create the WEBLOGIC database and WEBLOGIC database owner user login. An alias is created to make WEBLOGIC dbo in the database. Make the WebLogic database the default database for the WebLogic user.

    Usage Notes: You need to change database names, database owner user and password.

    The default names are the following:

    • database name: WEBLOGIC

    • database owner user: WEBLOGIC

    • password: WEBLOGIC

    You also need to edit the script 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.

    statistics.sql

    Runs sp_updatestats to compute database statistics needed for the database optimizer. Database statistics should be run updated periodically. That is, by default, for SQL Server databases with the AUTO_UPDATE_STATISTICS database option.

    install_report.sql

    Builds an informational installation report about the database objects created in the WEBLOGIC schema.

    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 in the database.

    Usage Notes: You need to change database names, database owner user and password.

    The default names are the following:

    • database name: WEBLOGIC_EVENT

    • database owner user: WEBLOGIC_EVENT

    • password: WEBLOGIC_EVENT

    You also need to edit the script 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.

    1. Run create_database.sql via OSQL as a user with System Administrator privileges (i.e. the sa user). For example:
    2. osql -Usa -SSQLSERVER -e -icreate_database.sql -ocreate_database.log

      The output from running create_database.sql is written to create_database.log. Verify that there are no errors in the log file before proceeding.

 


Manually Creating Database Objects

You can either manually create database objects or use the Configuration Wizard, see Manually Creating Database Objects and JDBC Settings on page 1-2 for more information.

Note: If you choose to use the WebLogic Configuration Wizard to configure and connect to the database that you will use to support WebLogic Portal, see http://download.oracle.com/docs/cd/E13196_01/platform/docs81/confgwiz/index.html.

The scripts to create Microsoft SQL Server database objects were designed to run in a Windows environment (they use the OSQL utility to create Microsoft SQL Server database objects). If you are using UNIX version of WebLogic Server with a Microsoft SQL Server database and do not have WebLogic products also installed on Windows contact BEA support for assistance.

To manually create WebLogic Portal database objects, use the following steps:

  1. Verify that you can connect to the target database server with a valid user ID and password. For example:
  2. osql -SSQLSERVER -U<userid> -P<password>
  3. Open your domain's db_settings.properties file for edit and comment out the database settings for PointBase.
  4. Uncomment the database settings for SQL Server and update the following settings for your database:
    • server=
    • dblogin=
    • password=
  5. Initialize the database with the new settings.
    1. For Windows, 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 create_db.log file.

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

 


Manually Configuring Your Domain's JDBC Driver Settings

You can either manually configure your domains JDBC driver settings using the WebLogic Server Console, or use the Configuration Wizard, see Manually Creating Database Objects and JDBC Settings on page 1-2 for more information.

To manually configure your JDBC Driver settings using WebLogic Server Console, :

  1. Start the WebLogic Server for your domain.
  2. Login 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. For more information, see the Supported Configuration documentation for JDBC drivers supported by WebLogic Portal, http://download.oracle.com/docs/cd/E13196_01/platform/docs81/support/supp_plat.html#1085671.

Note: For an XA configuration, see "Creating XA Domains Using Configuration Templates" in the "Creating WebLogic Configurations Using the Configuration Wizard documentation, http://download.oracle.com/docs/cd/E13196_01/platform/docs81/confgwiz/index.html .

    1. Choose a name for the new Connection Pool (For example: cgPoolN) and fill in the blanks for your vendor database. Click Continue.
    2. Test your connection to verify that you can successfully connect to your database.
    3. Create and deploy your new Connection Pool.

Note: A one-to-one mapping of JDBCTxDataSource to JDBC Connection Pool needs to be maintained in the domain's configuration (as managed in the config.xml file). Create one new JDBC Connection Pool for each JDBCTxDataSource and another JDBC Connection Pool for the domain's JDBCDataSources.

  1. 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.
  2. From Services -> JMS -> Stores -> cgJMSStore, switch cgJMSStore to use the new Connection Pool.
  3. Stop your domain's WebLogic Server, then restart it.
  4. In the WebLogic Server Console, delete the original connection pools.
    1. Go to Services -> JDBC -> Connection Pools.
    2. Right-click each 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 follow these steps if you are configuring a separate database for behavior tracking events.

  1. Verify that you can connect to the target database, see step 1. in .
  2. Run bt_create_database.sql via OSQL as a user with system administrator privileges (i.e. the sa user). For example:
  3. osql -Usa -SSQLSERVER -e -ibt_create_database.sql -obt_create_database.log

    The output from running bt_create_database.sql is written to bt_create_database.log. Verify that there are no errors in the log file before proceeding.

  4. Open your domain's db_settings.properties file for edit.
    1. Within the db_settings.properties file, uncomment the database settings for SQL Server database and update the following settings for your database:
    • server=<SERVER_NAME>
    • dblogin=WEBLOGIC_EVENT
    • password=WEBLOGIC_EVENT
  5. 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.
  6. 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 create_db.log file.

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

  1. Configure a connection pool to access your behavior tracking database and associate the p13n_tracking JDBC Data Source with that connection pool. Follow the steps in Manually Configuring Your Domain's JDBC Driver Settings on page 3-5.

 

Skip navigation bar  Back to Top Previous Next