Oracle® Real Application Clusters Installation Guide 11g Release 2 (11.2) for Linux and UNIX Part Number E10813-02 |
|
|
View PDF |
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:
Setting Environment Variables for Enterprise Manager DB Control
Configuring Database Control During and After Installation
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for procedures on using DBCA to add and delete instancesDBCA has the following primary database functions:
Create and delete the database
Add and delete database instances
Set up network configuration for the database and its instances
Register the database in Oracle Enterprise Manager Grid Control or configure Database Control
Configure options for the database, such as Oracle Database Vault
Start up the database and its instances
Note:
Cluster Managed Services are no longer managed through DBCA. Instead, use the cluster managed services page in Oracle Enterprise Manager DB Control (accessible from the Cluster Database Availability Page). For more information, refer to Oracle Real Application Clusters Administration and Deployment Guide.See Also:
"Creating an Oracle RAC Database with DBCA" for more information about using DBCA in standalone mode
Oracle Database Net Services Administrator's Guide to resolve problems—for example, with the listener configuration—and for further information about Lightweight Directory Access Protocol (LDAP)-compliant directory support
Oracle Database 2 Day + Real Application Clusters Guide for more information about using Oracle Enterprise Manager
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.
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.
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.
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:
Node Reachability: All the specified nodes are reachable from the local node.
User Equivalence: User equivalence exists on all the specified nodes.
Node Connectivity: Connectivity exists between all the specified nodes through the available public and private network interfaces.
Administrative Privileges: The oracle
user has proper administrative privileges on the specified nodes for creating an Oracle RAC database.
Oracle Clusterware Integrity: All the components of the Oracle Clusterware stack are fully operational.
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:
If nodes that are part of your cluster installation do not appear on the Node Selection page, then run Opatch lsinventory to perform inventory diagnostics and CVU to perform clusterware diagnostics.
The global database name can be up to 30 characters in length, and must begin with an alphabetic character. The domain portion of the global database name can be no more than 128 characters and can contain only alphabetic and numeric characters, as well as the period (.) character.
The SID
prefix must begin with an alphabetic character.
The maximum number of characters you can use for the SID prefix is 8 characters. DBCA uses the SID prefix to generate a unique value for the variable ORACLE_SID
for each instance.
On the Management Options page, you are provided with selections for Oracle Enterprise Manager monitoring and management interfaces.
Database Control is always an option. If DBCA discovers Grid Control agents on the cluster, then it also provides you with the option Enterprise Manager with the Grid Control. Choose between Database Control and Grid Control interfaces.
You can set up e-mail notification and enable daily backup operations. For e-mail notifications, you provide the outgoing mail server and e-mail address. For daily backups, you enter the backup time and operating system credentials for the user that performs backup operations.
Note that with Oracle RAC 11g release 2 and later, the storage administration role, SYSASM, requires membership in the OSASM group. This group may not be the same as OSDBA, whose members are granted the SYSDBA privilege. Tasks that require the SYSASM privilege in this list are marked with SYSASM Privilege.
SYSASM Privilege: To use a Fast Recovery Area, Oracle recommends that you create at least two separate Oracle ASM disk groups: one for the database area and one for the recovery area. Oracle recommends that you place the database area and the recovery area in separate failure groups. If you have divided administrative privileges, then ask your storage administrator to set up the Fast Recovery Area.
A failure group is defined by shared hardware, such as a controller shared between two storage devices, or two disks that are on the same spindle. If two storage devices share hardware that could fail, making both storage devices unavailable, then these storage devices are said to be in the same failure group.
If you do not use Oracle ASM, then Oracle recommends that the data files and the Fast Recovery Area are located outside of the Oracle home, in separate locations, as with separate Oracle ASM failure groups, so that a hardware failure does not affect availability.
See Also:
Oracle Database Concepts for more information about using a Fast Recovery Area, and Oracle Database Storage Administrator's Guide for information about failure groups and best practices for high availability and recoverySYSASM Privilege: On the Oracle ASM Disk Groups page, if you do not see the storage devices that you want to add, then click Change Disk Discovery Path to alter the search path used by DBCA to find available storage devices. You can select storage devices with a status of Candidate
or Former
(never used in an Oracle ASM disk group or no longer in a group) by selecting the box. If you want to add storage devices that still have Oracle ASM disk headers, but the disk group is no longer in use (a case that can occur if you are selecting storage devices after an aborted install, you attempted deinstallation without dropping the disk group, or other configuration problems), then use the Force
command.
On the Recovery Configuration page, if you are using Oracle ASM or cluster file system storage, then you can also select the Fast Recovery Area and size on the Recovery Configuration page. If you are using Oracle ASM, then the Fast Recovery Area defaults to the Oracle ASM Disk Group. If you are using OCFS2, then the Fast Recovery Area defaults to $ORACLE_BASE/flash_recovery_area
.
On the Initialization Parameters page, if you are installing on a Linux system, note that Memory Size (SGA and PGA), which sets the initialization parameter MEMORY_TARGET
or MEMORY_MAX_TARGET
, cannot be greater than the shared memory filesystem (/dev/shm
) on your operating system.
For example, if the shared memory filesystem allocation on your system is 1 GB, but you set Memory Size (MEMORY_TARGET
) to 2 GB, then you receive the following error during database startup:
ORA-00845: MEMORY_TARGET not supported on this system ORA-01078: Failure in processing system parameters
This issue is not relevant for other platforms.
For all platforms, if you intend to add more nodes in your cluster than you have during the current DBCA session, then click All Initialization Parameters, and change the parameter CLUSTER_DATABASE_INSTANCES
to the total number of nodes that you plan to add to the cluster.
In addition, if you click All Initialization Parameters, note that if your global database name is longer than 8 characters, then the database name value (in the DB_NAME
parameter) is truncated to the first 8 characters, and the DB_UNIQUE_NAME
parameter value is set to the global name.
See Also:
Oracle Database Administrator's Reference for Linux and UNIX-Based Operating Systems for information about initialization parametersAfter you respond to DBCA prompts, review the Summary dialog information and click OK, DBCA does the following:
Creates an operative Oracle RAC database and its instances
Creates the Oracle RAC data dictionary views
Configures the network for the cluster database
Migrates previous release Oracle Database listeners and related files to the Oracle Database 11g Oracle home
Starts the listeners and database instances, and then starts the high availability services
Configures Oracle Enterprise Manager Database Control or Grid Control
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.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:
Start DBCA on one of the nodes:.
Run the dbca
command from the $ORACLE_HOME/bin
directory.
The DBCA Welcome page appears.
Select Oracle Real Application Clusters, and click Next.
Select Delete a database, and click Next. DBCA displays the List of Cluster Databases page.
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.
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.
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:
Deleted the selected database from the cluster
Deleted high availability services that were assigned to the database
Deleted the Oracle Net configuration for the database
Deconfigured Database Control for that database
Deleted the OFA directory structure for that database from the cluster
Deleted the data files if the data files were not on raw devices
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:
Configuring an Existing Database for Database Control with DBCA
Reconfiguring Existing Database Control Configurations on Remote Nodes
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.
Use the following DBCA procedure to configure an existing Oracle Database installation so it can be managed with Database Control:
Log into the database host as a user that is a member of the oraInventory group.
Change directory to the $ORACLE_HOME/bin
directory and start DBCA using the following command:
[oracle@node1]$ ./dbca
The DBCA Welcome page appears.
Advance to the Operations page and select Configure Database Options.
Advance to the Database page and select the database you want to configure.
Advance to the Management Options page and select the following options:
Configure the Database with Enterprise Manager
Use Database Control for Database Management
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.
Advance until the Finish button is available.
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
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:
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
Change directory to the $ORACLE_HOME/bin
directory.
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
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:
Starts a Database Control Console on nodename
, if one has not been started yet.
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.