5 Preparing the Database for an Enterprise Deployment

This chapter describes procedures for preparing your database for an Oracle SOA enterprise deployment. The procedures include initial setup of the database, loading the metadata repository, and backing up the database.

This chapter includes the following topics:

5.1 Overview of Preparing the Database for an Enterprise Deployment

For the SOA enterprise topology, the database contains the Oracle Fusion Middleware Repository, which is a collection of schemas used by various Oracle Fusion Middleware components, such as the SOA components, BAM, and UMS. This database is separate from the Identity Management database, which is used in Identity Management Enterprise Deployment by components such as Oracle Internet Directory, DIP, and so on.

You must install the Oracle Fusion Middleware Repository before you can configure the Oracle Fusion Middleware components. You install the Oracle Fusion Middleware metadata repository into an existing database using the Repository Creation Utility (RCU), which is available from the RCU DVD or from the location listed in Table 2-2. For the enterprise topology, a Real Application Clusters (Oracle RAC) database is highly recommended.

When you configure the SOA components, the configuration wizard will prompt you to enter the information for connecting to the database that contains the metadata repository.

5.2 About Database Requirements

Before loading the metadata repository into your database, check that the database meets the requirements described in these subsections:

5.2.1 Database Host Requirements

On the hosts CUSTDBHOST1 and CUSTDBHOST2 in the data tier, note the following requirements:

  • Oracle Clusterware

    For 11g Release 1 (11.1) for Linux, refer to the Oracle Clusterware Installation Guide for Linux.

  • Oracle Real Application Clusters

    For 11g Release 1 (11.1) for Linux, refer to the Oracle Real Application Clusters Installation Guide for Linux and UNIX. For 10g Release 2 (10.2) for Linux, refer to Oracle Database Oracle Clusterware and Oracle Real Application Clusters Installation Guide.

  • Automatic Storage Management (optional)

    ASM is installed for the node as a whole. Oracle recommends installing it in a separate Oracle Home from the Database Oracle Home. This option comes appears in the Select Configuration page. Select the Configure Automatic Storage Management option to create a separate ASM home.

  • Time synchronization between Oracle RAC database instances

    The clocks of the database instances being used by servers in a Fusion Middleware cluster that is configured with server migration must be in sync.

5.2.2 Supported Database Versions

Oracle SOA Suite requires the presence of a supported database and schemas:

To check the release of your database query the PRODUCT_COMPONENT_VERSION view:

SQL> SELECT VERSION FROM SYS.PRODUCT_COMPONENT_VERSION WHERE PRODUCT LIKE 'Oracle%';

Notes:

  • Oracle SOA requires that the database used to store its metadata (either 10g or 11g) supports the AL32UTF8 character set. Check the database documentation for information on choosing a character set for the database.

  • For Oracle SOA enterprise deployments, Oracle recommends using GridLink data sources to connect to Oracle RAC databases. To use the Oracle Single Client Access Name (SCAN) feature with GridLink, the Oracle RAC database version must be Oracle Database 11gR2 (11.2 or later, Enterprise Edition).

5.2.3 About Initialization Parameters

Ensure that the following initialization parameter is set to the required minimum value. It is checked by Repository Creation Assistant.

Table 5-1 Required Initialization Parameters

Configuration Parameter Required Value Parameter Class

SOA

PROCESSES

300 or greater

Static

BAM

PROCESSES

100 or greater

Static

SOA and BAM

PROCESSES

400 or greater

Static

SOA and OSB

PROCESSES

800 or greater

Static


To check the value of the initialization parameter using SQL*Plus, you can use the SHOW PARAMETER command.

As the SYS user, issue the SHOW PARAMETER command as follows:

SQL> SHOW PARAMETER processes;

Set the initialization parameter using the following command:

SQL> ALTER SYSTEM SET processes=300 SCOPE=SPFILE;

Restart the database.

Note:

The method that you use to change a parameter's value depends on whether the parameter is static or dynamic, and on whether your database uses a parameter file or a server parameter file. See the Oracle Database Administrator's Guide for details on parameter files, server parameter files, and how to change parameter values.

5.3 Creating Database Services

When multiple Oracle Fusion Middleware products are sharing the same database, each product should be configured to connect to a separate, dedicated database service. In addition, the database service should be different from the default database service. For more information about connecting to Oracle databases using services, see "Overview of Connecting to Oracle Database Using Services and VIP Addresses" in the Oracle Real Application Clusters Administration and Deployment Guide. For complete instructions on creating and managing database services, see "Introduction to Automatic Workload Management" in the Oracle Real Application Clusters Administration and Deployment Guide.

Run-time connection load balancing requires configuring Oracle RAC Load Balancing Advisory with service-level goals for each service for which load balancing is enabled. You can configure the Oracle RAC Load Balancing Advisory for SERVICE_TIME or THROUGHPUT. Set the connection load balancing goal to SHORT. For 10g and 11gr1 databases, use the DBMS_SERVICE package for this modification. For 11g R2 use the srvctl command utility instead.

This section includes the following topics:

5.3.1 Creating Database Services for 10g and 11g Release 1 (11.1) Databases

You can create and modify 10g and 11g database services using the DBMS_SERVICE package.

To create and modify database services:

  1. Logon to SQL*Plus and create the service:

    SQL*Plus "sys/password as sysdba"
     
    SQL> EXECUTE DBMS_SERVICE.CREATE_SERVICE
    (SERVICE_NAME => 'soaedg.mycompany.com',
    NETWORK_NAME => 'soaedg.mycompany.com'
    ); 
    

    Note:

    For the Service Name of the Oracle RAC database, use lowercase letters, followed by the domain name. For example:

    soaedg.mycompany.com

    Note:

    Enter the EXECUTE DBMS_SERVICE command shown on a single line.

    For more information about the DBMS_SERVICE package, see the Oracle Database PL/SQL Packages and Types Reference.

  2. Add the service to the database and assign it to the instances using the srvctl command:

    srvctl add service -d soadb -s soaedg.mycompany.com -r soadb1,soadb2
    
  3. Start the service:

    srvctl start service -d soadb -s soaedg.mycompany.com
    

    Note:

    For complete instructions on creating and managing database services with SRVCTL, see "Administering Services with SRVCTL" in the Oracle Real Application Clusters Administration and Deployment Guide.

  4. Modify the service for the appropriate service goals:

    SQL>EXECUTE DBMS_SERVICE.MODIFY_SERVICE (service_name => 'soaedg.mycompany.com',goal => DBMS_SERVICE.GOAL_THROUGHPUT, clb_goal =>DBMS_SERVICE.CLB_GOAL_SHORT);
    

    Or

    SQL>EXECUTE DBMS_SERVICE.MODIFY_SERVICE (service_name => 'soaedg.mycompany.com', goal => DBMS_SERVICE.GOAL_SERVICE_TIME, clb_goal =>DBMS_SERVICE.CLB_GOAL_SHORT);
    

5.3.2 Creating Database Services for 11g Release 2 (11.2) Databases

You can create and modify 11g Release 2 (11.2) database services using the srvctl utility.

To create and modify the database services:

  1. Logon to SQL*Plus and create the service:

    sqlplus "sys/password as sysdba"
     
    SQL> EXECUTE DBMS_SERVICE.CREATE_SERVICE
    (SERVICE_NAME => 'soaedg.mycompany.com',
    NETWORK_NAME => 'soaedg.mycompany.com'
    ); 
    

    Note:

    For the Service Name of the Oracle RAC database, use lowercase letters, followed by the domain name. For example:

    soaedg.mycompany.com

    Note:

    Enter the EXECUTE DBMS_SERVICE command shown on a single line.

    For more information about the DBMS_SERVICE package, see the Oracle Database PL/SQL Packages and Types Reference.

  2. Add the service to the database and assign it to the instances using srvctl:

    srvctl add service -d soadb -s soaedg.mycompany.com -r soadb1,soadb2
    
  3. Start the service:

    srvctl start service -d soadb -s soaedg.mycompany.com
    

    Note:

    For complete instructions on creating and managing database services with SRVCTL, see "Administering Services with SRVCTL" in the Oracle Real Application Clusters Administration and Deployment Guide.

  4. Modify the service for the appropriate service goals:

    srvctl modify service -d soadb -s soaedg.mycompany.com -B SERVICE_TIME -j SHORT
    

    Or

    srvctl modify service -d soadb -s soaedg.mycompany.com -B         THROUGHPUT  -j SHORT
    

    For more information about the different service definitions, see "Load Balancing Advisory" in the Oracle Real Application Clusters Administration and Deployment Guide.

5.4 Loading the Oracle Fusion Metadata Repository in the Oracle RAC Database

The Repository Creation Utility (RCU) is available from the RCU DVD. The RCU used to seed the database must match the patch set level of the Oracle SOA Suite installation. This means that if you install Oracle SOA Suite 11gR1 PS5 (11.1.1.6) in this enterprise deployment, you must use RCU 11gR1 PS5 (11.1.1.6).

To load the Oracle Fusion Middleware Repository into a database:

  1. Start Repository Creation Utility (RCU), which is available from the RCU DVD by first inserting the RCU DVD.

  2. Start RCU from the bin directory:

    ./rcu

  3. In the Welcome screen, click Next.

  4. In the Create Repository screen, select Create to load component schemas into a database. Click Next.

  5. In the Database Connection Details screen, enter the correct information for your database:

    1. Database Type: select Oracle Database.

    2. Host Name: Enter the name of the node that is running the database. For the Oracle RAC database, specify the virtual IP name or one of the node names as the host name: CUSTDBHOST1-VIP.

      Note:

      You can use the RAC SCAN address as the host name. For more information about using SCAN addresses, "Using SCAN Addresses with Oracle Database 11g (11.2)" in the Oracle Fusion Middleware High Availability Guide.

    3. Port: Enter the port number for the database: 1521.

    4. Service Name: Enter the service name of the database in lowercase characters. For example:

      soaedg.mycompany.com

    5. Username: SYS

    6. Password: Enter the password for the SYS user.

    7. Role: SYSDBA

    Click Next.

  6. If you get this warning message: The database you are connecting is with non-UTF8 charset, if you are going to use this database for multilingual support, you may have data loss. If you are not using for multilingual support you can continue, otherwise we strongly recommend using UTF-8 database.

    Click Ignore or Stop.

  7. In the Select Components screen, do the following:

    1. Select Create a New Prefix, and enter a prefix to use for the database schemas. Example: DEV or PROD. Prefixes are used to create logical groupings of multiple repositories in a database. For more information, see Oracle Fusion Middleware Repository Creation Utility User's Guide.

    2. Note the name of the schema because you will need to enter it during the procedure in Section 5.5.

    3. Select the following:

      • AS Common Schemas:

        - Metadata Services

      • SOA and BPM Infrastructure:

        - SOA Infrastructure

        - User Messaging Service

        - Business Activity Monitoring

        Note:

        Business Activity Monitoring (BAM) is only required for BAM installations.

    Note:

    Oracle Service Bus required objects are created as part of the SOA_INFRA schema.

    Click Next.

  8. In the Schema Passwords screen, select Use main schema passwords for auxiliary schemas. In the subsequent screen refresh, enter the schema passwords for all components.

  9. In the Map Tablespaces screen, choose the tablespaces for the selected components, and click Next.

    A confirmation dialog is displayed stating that any tablespace that does not already exist in the selected schema will be created. Click OK to acknowledge this message.

  10. In the Summary screen, click Create.

  11. In the Completion Summary screen, click Close.

  12. Verify that the required schemas are created by connecting to the database with the new user added:

    sqlplus  PROD_SOAINFRA/password;
    

    Query the description of the CUBE_INSTANCE table for a simple verification. A table similar to the following should display:

    SQL> desc CUBE_INSTANCE;
     Name                                      Null?    Type
     --------------------------------- ---- --------------------------
     CIKEY                                     NOT NULL NUMBER(38)
     CREATION_DATE                             NOT NULL TIMESTAMP(6)
    ...
    

About Oracle WSM policies and the OWSM MDS schemas

If Oracle WSM is part of your SOA enterprise deployment, Oracle recommends using the identity management database to store the Oracle WSM policies. Use the IM database connection information for the OWSM MDS schemas instead of the information used for the rest of SOA schemas. To create the required schemas in the database, repeat the steps above (run RCU again) using the IM database information, but select only AS Common Schemas: Metadata Services in the Select Components screen (step 7). See Chapter 15, "Integrating an Enterprise Deployment with Oracle Identity Management." for information on using the identity management database to store the Oracle WSM policies.

5.5 Configuring SOA Schemas for Transactional Recovery Privileges

You need the appropriate database privileges to allow the Oracle WebLogic Server transaction manager to query for transaction state information and issue the appropriate commands, such as commit and rollback, during recovery of in-flight transactions after a WebLogic Server container crash.

These privileges should be granted to the owner of the soainfra schema, as determined by the RCU operations.

To configure the SOA schemas for transactional recovery privileges:

  1. Log on to SQL*Plus as a user with sysdba privileges. For example:

    sqlplus "/ as sysdba"
    
  2. Enter the following commands:

    SQL> Grant select on sys.dba_pending_transactions to soa_schema_prefix_soainfra;
    
    Grant succeeded.
     
    SQL> Grant force any transaction to soa_schema_prefix_soainfra;
     
    Grant succeeded.
     
    SQL> 
    

5.6 Backing Up the Database

After you have loaded the metadata repository into your database, make a backup before installing the software for your enterprise deployment.Backing up the database is for the explicit purpose of quick recovery from any issue that may occur in the further steps. You can choose to use your backup strategy for the database for this purpose or simply make a backup using operating system tools or RMAN for this purpose. Oracle recommends using Oracle Recovery Manager for the database, particularly if the database was created using Oracle ASM. If possible, you can also perform a cold backup using operating system tools such as tar.

Database Growth Management Strategy

An Oracle SOA Suite 11g installation presents several challenges for database administrators, including managing the growth of the Oracle SOA Suite database. Underestimating the importance of managing the database can lead to issues when the database is moved to a production environment. For information about determining an appropriate strategy and planning for capacity, testing, and monitoring, see "Introduction to Planning for Database Growth" in the Oracle Fusion Middleware Administrator's Guide for Oracle SOA and Oracle Business Process Management Suite.