Skip Headers
Oracle® Real Application Clusters Installation Guide
11g Release 2 (11.2) for Linux and UNIX

Part Number E10813-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

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

3 Creating Oracle Real Application Clusters Databases with Database Configuration Assistant

This chapter describes how to use Database Configuration Assistant (DBCA) in standalone mode to create and delete Oracle Real Application Clusters (Oracle RAC) databases. The topics in this chapter include the following:

3.1 Using Database Configuration Assistant with Oracle RAC

DBCA has the following primary database functions:

See Also:

3.2 Benefits of Using Database Configuration Assistant

Oracle recommends that you use DBCA to create your Oracle RAC database, because preconfigured databases optimize your environment for features such as, the server parameter file (SPFILE), and automatic undo management. If you use Oracle ASM or cluster file system storage, then DBCA also configures automated backup, which uses the Fast Recovery Area.

DBCA enables you to create both policy-managed and administrator-managed databases.

With DBCA, you can create site-specific tablespaces as part of database creation. If you have data file requirements that differ from those offered by DBCA templates, then create your database with DBCA and modify the data files later. You can also run user-specified scripts as part of your database creation process.

DBCA also configures your Oracle RAC environment for various Oracle high availability features, such as cluster administration tools. It also starts any database instances required to support your defined configuration.

3.3 Automatic Listener Migration from Earlier Releases

If your system has an Oracle Database 10g or 11g installation, and you install Oracle Database 11g release 2 (11.2) either to coexist with or to upgrade the Oracle Database 10.1, 10.2, or 11.1 installation, then most installation types automatically migrate the existing Oracle Database listener to the 11g release 2 (11.2) Oracle home. During migration, they configure and start a default Oracle Net listener using the same TCP/IP port as the existing listener, with the IPC key value.

During the Oracle Clusterware upgrade, the default listener (LISTENER_NODENAME is migrated to the Oracle grid infrastructure home (Grid home). DBCA always uses the default listener.

The listener migration process stops the listener in the existing Oracle home, and restarts it in the new Oracle home. If the database was using the default listener (LISTENER_NODENAME), then it is migrated automatically to the Oracle Clusterware home by NETCA as part of the Oracle Clusterware upgrade. If the database was using a nondefault listener, then DBUA migrates the nondefault listener to the Oracle Database home.

During migration, client applications may not be able to connect to any databases that are registered to the listener that is being migrated.

3.4 Setting Environment Variables for Enterprise Manager DB Control

In previous releases of Oracle Database, you were required to set environment variables for ORACLE_HOME and ORACLE_SID to start, stop, and check the status of Enterprise Manager. With Oracle Database 11g release 2 (11.2) and later, you need to set the environment variables ORACLE_HOME and ORACLE_UNQNAME to use Enterprise Manager. For example, on each node, enter commands similar to the following to set these values for the oracle user with the Bourne shell as the default shell, where the Oracle home is /u01/app/oracle, and where the database unique name is sales:

$ export ORACLE_HOME=/u01/app/oracle/product/11.2/dbhome1
$ export ORACLE_UNQNAME=sales

Place these environment variables in the oracle user profile file on each cluster member node to ensure that they are available after system restarts.

3.5 Verifying Requirements for DBCA

If you want to use DBCA to change database configuration, then use Cluster Verification Utility (CVU) to verify that your system is prepared for configuration changes using the following command syntax:

/Grid_home/bin/cluvfy.sh stage -pre dbcfg -fixup -n node_list -d Oracle_home [-verbose]

In the preceding syntax example, the variable Grid_home is the Oracle grid infrastructure home, the variable node_list is the list of nodes in your cluster, separated by commas, and the variable Oracle_home is the path for the Oracle home directory where OUI creates or modifies the database. The -fixup flag generates a fixup script that can be run as root to resolve many operating system configuration tasks if they were not completed before you run the check.

For example, to perform a check to determine if your system is prepared for an Oracle Database with Oracle RAC installation on a two-node cluster with nodes node1 and node2, with the Oracle grid infrastructure home path/u01/app/grid/11.2.0, and with the Oracle home path /u01/app/oracle/product/11/db1, enter the following command:

$ /u01/app/grid/11.2.0/bin/cluvfy stage -pre dbcfg -fixup -n node1,node2 -d\
/u01/app/oracle/product/11/db1

You can select the option -verbose to receive progress updates as the CVU performs its system checks, and detailed reporting of the test results.

If the CVU summary indicates that the cluster verification check fails, and you cannot resolve these issues by running the fixup script, then review and correct the relevant system configuration steps, and run the test again.

The command cluvfy.sh stage -pre dbcfg verifies the following:

3.6 Creating an Oracle RAC Database with DBCA

To create a database with DBCA in standalone mode without Oracle ASM or a cluster file system, you must have configured shared storage devices. In addition, you must have run the Oracle Net Configuration Assistant (NETCA) to configure your Oracle Net listener.ora file, and you must set operating system environment variables ORACLE_HOME to the Oracle RAC database home, and ORACLE_UNQNAME to the database unique name.

To start DBCA, connect as the installation owner account (for example, oracle) to one of your nodes where Oracle RAC is installed, load SSH keys into memory, and enter the command dbca command from the $ORACLE_HOME/bin directory.

Note:

In an Oracle RAC environment, you must load SSH keys into memory for the terminal session where you start DBCA. If you do not do this, then you receive user equivalency errors when you attempt to start DBCA. If you use a pass phrase on your system for SSH, then you must provide the pass phrase to load the SSH keys.

Use the following commands to load SSH keys:

$ exec /usr/bin/ssh-agent $SHELL
$ /usr/bin/ssh-add

If needed, provide the pass phrase when prompted. You can then start DBCA.

When you start DBCA, the first page it displays is the Welcome page for Oracle RAC, which includes the option to select an Oracle RAC database. DBCA displays this Oracle RAC Welcome page only if the Oracle home from which it is started was installed on a cluster.

If the Oracle RAC Welcome page opens, then provide information as prompted by DBCA. Click Help if you need assistance.

If DBCA does not display the Welcome page for Oracle RAC, then DBCA was unable to detect if the Oracle home is installed on a cluster. In this case, check that the OUI inventory is correctly located in the directory /etc/oraInst.loc, and that the oraInventory file is not corrupted. Also, perform clusterware diagnostics by using the following CVU command syntax:

/Grid_home/bin/cluvfy/runcluvfy.sh stage -post crsinst -n nodelist.

For example, with the mountpoint /u01/app/grid/11.2.0, and nodes node1 and node2, run the following command:

$ /u01/app/grid/11.2.0/bin/cluvfy.sh stage -post crsinst -n node1,node2

Note the following important information when using DBCA:

After you respond to DBCA prompts, review the Summary dialog information and click OK, DBCA does the following:

Caution:

After you have created the database, if you decide that you want to install additional Oracle Database products in the database you have created, then you must stop all processes running in the Oracle home before you attempt to install the additional products, so that Oracle Universal Installer can relink certain executables and libraries. Refer to Appendix E, "How to Stop Processes in an Existing Oracle Real Application Clusters Database" for additional information.

3.7 Deleting an Oracle RAC Database with DBCA

This section explains how to delete an Oracle RAC database with DBCA. This process deletes a database and removes a database's initialization parameter files, instances, OFA structure, and an Oracle network configuration. However, this process does not remove data files if you placed the files on raw devices or on raw partitions.

To delete a database with DBCA:

  1. Start DBCA on one of the nodes:.

    • Run the dbca command from the $ORACLE_HOME/bin directory.

    The DBCA Welcome page appears.

  2. Select Oracle Real Application Clusters, and click Next.

    After you click Next, DBCA displays the Operations page.

  3. Select Delete a database, and click Next. DBCA displays the List of Cluster Databases page.

  4. If your user ID and password are not operating-system authenticated, then the List of Cluster Databases page displays the user name and password fields. If these fields appear, then enter a user ID and password for a user account that has SYSDBA privileges.

  5. Select the database to delete, and click Finish.

    After you click Finish, DBCA displays a dialog box to confirm the database and instances that DBCA is going to delete.

  6. Click OK to begin the deletion of the database and its associated files, services, and environment settings, or click Cancel to stop the operation.

When you click OK, DBCA continues the operation and deletes all the associated instances for this database. DBCA also removes the parameter files, password files, and oratab entries.

At this point, you have accomplished the following:

3.8 Configuring Database Control During and After Installation

The following sections describe how Oracle Enterprise Manager Database Control is configured during Oracle RAC installation. These sections also describe how you can configure Database Control after the installation:

3.8.1 Configuring Database Control During Installation

If you create a database while installing Oracle Database, then you can configure your database so it can be managed by Oracle Enterprise Manager Grid Control Console, or by Oracle Enterprise Manager Database Control Console.

To select Grid Control Console as your management option, the Oracle Management Service must be installed on a network host. In addition, the Oracle Management Agent must be installed on the host where you are installing the database. Otherwise, the Grid Control Console option is unavailable, and you must instead choose to manage your database with Database Control.

For most Oracle Database installation types, you must choose either Database Control or Grid Control as your management option when you create a database during the installation.

However, if you create a database using one of the following methods, you can choose not to configure Database Control:

  • Choosing the Advanced database configuration option during an Enterprise or Standard Edition installation

  • Running Database Configuration Assistant (DBCA) after the installation

If you do not configure Database Control during the Oracle Database 11g release 2 (11.2) installation, then no hostname_dbuniquename directory is created in the resulting Oracle home directory.

3.8.2 Configuring an Existing Database for Database Control with DBCA

Use the following DBCA procedure to configure an existing Oracle Database installation so it can be managed with Database Control:

  1. Log into the database host as a user that is a member of the oraInventory group.

  2. Change directory to the $ORACLE_HOME/bin directory and start DBCA using the following command:

    [oracle@node1]$ ./dbca
    

    The DBCA Welcome page appears.

  3. Advance to the Operations page and select Configure Database Options.

  4. Advance to the Database page and select the database you want to configure.

  5. Advance to the Management Options page and select the following options:

    • Configure the Database with Enterprise Manager

    • Use Database Control for Database Management

  6. Optionally, select the options for enabling e-mail notifications and enabling daily backups.

    For more information about Enterprise Manager notifications and daily backups, click Help on the Management Options page.

  7. Advance until the Finish button is available.

  8. Click Finish to reconfigure the database so it uses Database Control.

    After DBCA reconfigures the database, a new subdirectory appears in the Oracle home. This directory is named using the following format and contains Database Control configuration and state files specific to the database you just configured:

    hostname_dbuniquename
    

    Oracle Real Application Clusters database directories are named using the syntax nodename_dbuniquename. For example, node mycluster1 in the Oracle RAC database mycluster appears as follows:

    mycluster1.example.com_myNewDB
    

3.8.3 Configuring Database Control with EMCA

When you use DBCA to configure Oracle RAC, DBCA provides a graphical user interface to help you select Database Control options and to configure other aspects of your database.

However, if you want to use the operating system command line to configure Database Control, you can use the Enterprise Manager Configuration Assistant (EMCA).

WARNING:

During the database configuration using EMCA, the database will be unavailable and users cannot connect to the database or perform operations on the database.

To configure Database Control with EMCA:

  1. Set the following environment variables to identify the Oracle home and the system identifier (SID) for the database you want to manage:

    • ORACLE_HOME

    • ORACLE_SID

  2. Change directory to the $ORACLE_HOME/bin directory.

  3. Start EMCA by entering the following command.

    $ ./emca 
    

    Depending upon the arguments you include on the EMCA command line, EMCA prompts you for the information required to configure Database Control. To see a list of EMCA options, start EMCA using the following command:

    $ ./emca -h
    

    Note:

    To use EMCA commands in Oracle RAC environments, use the -cluster flag.

When you use EMCA to configure Database Control for Oracle RAC, you configure the Database Control for each instance in the cluster. However, by default, the Database Control Console will only start on the local node. On every other node of the cluster, only the Enterprise Manager agent will start. This is because the Database Control Console opens a number of connections to the database. If an instance of the console is running on every host in the cluster, then you may easily exceed the maximum number of permitted open connections on a 32-node or 64-node environment.

When Database Control Console is started on the local node, on every other node, the commands emctl start dbconsole and emctl stop dbconsole only start and stop the agent. Each of the remote agents upload their respective data to the console running on the local node, where you can monitor and manage all the targets in the cluster. On each instance of the Oracle RAC database, the following subdirectories will be created, where nodename is the name of a node in the cluster, and DBUniqueName is the database system identifier:

$ORACLE_HOME/nodename_DBUniqueName
$ORACLE_HOME/nodename_DBUniqueName

3.8.4 Reconfiguring Existing Database Control Configurations on Remote Nodes

If you upgrade an existing Oracle RAC database configured with Database Control to the current release, then the existing Database Control configuration will be retained. The existing Database Control has a Database Console running on each cluster node. The console will still be started on each individual node.

If you wish to modify the Database Control configuration on all the nodes in the cluster, then use the following command:

$ emca -reconfig dbcontrol –cluster –EM_NODE nodename -EM_NODE_LIST NODE_list

where nodename is the public name of the node and NODE_list is a comma-separated list of database system identifiers. This command reconfigures the current Database Control setup and:

  1. Starts a Database Control Console on nodename, if one has not been started yet.

  2. Redirects the agents monitoring the database instances in NODE_list so that they upload their data to the console running on nodename. Also, agents monitoring database instances on nodename will also upload their data to the local console. Note that if you do not enter the command options -EM_NODE or -EM_NODE_LIST at the command line, you are prompted for them.

-EM_NODE defaults to the local node if not specified when prompted. -EM_NODE_LIST defaults to all database instances if not specified.

You can use this command to start the console on more than one node. For example, on an 8-node cluster with nodes node1, node2, node3, node4, node5, node6, node7, and node8, you can run the following commands in succession:

$ emca -reconfig dbcontrol –cluster –EM_NODE node1 -EM_NODE_LIST node2,node3,node4
$ emca -reconfig dbcontrol –cluster –EM_NODE node5 -EM_NODE_LIST node6,node7,node8

In this scenario, two Database Control consoles start: one on node1 and the other on node5. You can manage and monitor all targets in the cluster from either of these two consoles.

For information on the current cluster configuration, you can run the following command:

emca -displayConfig dbcontrol –cluster

This command prompts for the database unique name for the cluster database. It prints the current configuration to the screen, indicating the nodes that have consoles running on them and the consoles where each agent is uploading.