3 Creating Oracle RAC or Oracle RAC One Node Databases with DBCA

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 DBCA with Oracle RAC or Oracle RAC One Node

DBCA has the following primary database functions:

  • Create and delete databases

  • Create database templates

  • Create, plug, unplug, and delete pluggable databases (PDBs)

  • Add and delete database instances

  • Register databases in Oracle Enterprise Manager Cloud Control

  • Configure database options (such as Oracle Database Vault) and register database with the Directory Server

Note:

Cluster Managed Services are no longer managed through DBCA. Instead, use the Cluster Managed Services page in Oracle Enterprise Manager Cloud Control, if available, or SRVCTL. For more information, see Oracle Real Application Clusters Administration and Deployment Guide.

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.

DBCA enables you to create both policy-managed and administrator-managed databases. With DBCA, you can also 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. DBCA also starts any database instances required to support your defined configuration.

You can use DBCA to create a database from templates supplied by Oracle, or from templates that you create. The templates contain settings optimized for a particular type of workload.

Oracle ships templates for the following two workload types:

  • General purpose or transaction processing

  • Data warehouse

For more complex environments, you can select the Custom Database option. This option does not use templates and results in a more extensive interview, which means that it takes longer to create your database.

Click Show Details to see the configuration for each type of database. Select the template suited to the type of workload your database will support. If you are not sure which to choose, then select the default General Purpose or Transaction Processing template.

3.3 Automatic Listener Migration from Earlier Releases

If your system has an Oracle Database 10g or 11g installation, and you install Oracle Database 12c Release 1 (12.1) either to coexist with or to upgrade the Oracle Database 10.1, 10.2, 11.1, or 11.2 installation, then most installation types automatically migrate the existing Oracle Database listener to the 12c Release 1 (12.1) Oracle home. During migration, the upgrade process configures and starts 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) was 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 Oracle Net Configuration Assistant (NETCA) migrates the listener automatically to the Grid home as part of the Oracle Grid Infrastructure upgrade. If the database was using a nondefault listener, then Database Upgrade Assistant (DBUA) migrates the nondefault listener to the Oracle Database home.

Note:

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 Verifying Requirements for DBCA

To use Database Configuration Assistant (DBCA) to change the database configuration, run Cluster Verification Utility (CVU) to verify that your system is prepared for configuration changes using the following command syntax:

/Grid_home/bin/cluvfy 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 verify that 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/12.1.0/grid, and with the Oracle home path /u01/app/oracle/product/12.1.0/db1, enter the following command:

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

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

If the CVUsummary 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.

3.5 Creating an Oracle RAC or Oracle RAC One Node Database with DBCA

To create a database with DBCA, you must have run the Oracle Net Configuration Assistant (NETCA) to configure your Oracle Net listener.ora file. You no longer need to set the operating system environment variables ORACLE_HOME to the Oracle RAC database home, or ORACLE_UNQNAME to the database unique name unless you are using Oracle Transparent Data Encryption with Oracle RAC.

Note:

You can no longer set up email notification for Oracle RAC databases either from DBCA or OUI.

This section contains the following topics about using DBCA with Oracle RAC:

3.5.1 Tasks to Complete Before Using DBCA to Create any Oracle RAC Database

Before you can create an Oracle RAC database using DBCA you must configure your system to meet the software requirements, if this was not done as part of the Oracle Grid Infrastructure installation.

The following sections describe some common tasks you must perform:

3.5.1.1 Load SSH Keys Into Memory Before Starting DBCA

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.

3.5.1.2 Decide on a Naming Convention to Use for Your Oracle RAC Database

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, and the period (.) 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. The SID prefix must begin with an alphabetic character.

3.5.1.3 Configure Shared Storage for the Oracle RAC Database

Before starting DBCA to configure an Oracle RAC database, you must have installed Oracle Grid Infrastructure for a cluster, and you must have configured shared storage areas for Oracle RAC files. Storage administration tasks require the SYSASM system privileges, which are granted to members of the OSASM operating system group. This group may not be the same as the OSDBA group, whose members are granted the SYSDBA system privileges.

See Oracle Grid Infrastructure Installation Guide for your platform for more information about shared storage configuration requirements.

3.5.2 Using DBCA to Create any Oracle RAC Database

This section describes how to use DBCA to create an Oracle RAC database or Oracle RAC One Node database:

3.5.2.1 Starting DBCA

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 from the $ORACLE_HOME/bin directory.

Note:

You no longer need to set the operating system environment variables ORACLE_HOME to the Oracle RAC database home, or ORACLE_UNQNAME to the database unique name. However, if you are using Oracle Transparent Data Encryption with Oracle RAC, then you need to configure the ORACLE_UNQNAME parameter.

3.5.2.2 Cluster Detection and Node Selection when Using DBCA

When you start DBCA, it automatically shows Oracle RAC options if it detects from the central Oracle Inventory that the Oracle home is enabled for Oracle RAC.

If DBCA does not automatically display Oracle RAC options, 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/cluvfy.sh stage -post crsinst -n nodelist

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

$ /u01/app/12.1.0/grid/bin/cluvfy stage -post crsinst -n node1,node2

Note that when using DBCA, if nodes that are part of your cluster installation do not appear on the Node Selection page, then run the Opatch lsinventory command to perform inventory diagnostics. Also use CVU to perform clusterware diagnostics.

On the Management Options page, you are provided options for managing the database, either with Oracle Enterprise Manager Database Express or Oracle Enterprise Manager Cloud Control. For Oracle RAC databases, Oracle Enterprise Manager Database Express is configured to connect to the cluster using the Single Client Access Name (SCAN).

3.5.2.3 Using DBCA to Select Storage to Use With any Oracle RAC Database

You can choose to use either Oracle ASM diskgroups or a supported cluster file system as storage.

On the Specify Database Storage Options page, if you do not see the diskgroups in DBCA, then either Oracle ASM is not configured, or diskgroups are not mounted. You can create diskgroups using ASMCA in the Grid Infrastructure home before starting DBCA.

If you are using Oracle ASM or cluster file system storage, then you can also select the Fast Recovery Area and size on this page. If you are using Oracle ASM, then the Fast Recovery Area defaults to the Oracle ASM Disk Group.

3.5.2.4 Using DBCA to Specify Database Initialization Parameters for Oracle RAC

On the Initialization Parameters page, 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.

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 file system on your operating system.

For example, if the shared memory file system 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.

See Also:

Oracle Database Administrator's Guide for information about initialization parameters

3.5.2.5 Actions Performed By DBCA for Oracle RAC Databases

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

  • Creates an Oracle RAC database, and its instances

  • Creates the Oracle RAC data dictionary views

  • Starts the CRS (Cluster Ready Service) resource for the database

Caution:

After you have created the Oracle RAC database, if you decide to install additional Oracle Database products in the Oracle RAC database you have created, then before you attempt to install the products, you must stop all processes running in the Oracle RAC database homes.

You must stop all processes running in the Oracle RAC homes so that Oracle Universal Installer can relink certain executables and libraries. Refer to Appendix D, "How to Stop Processes in an Existing Oracle RAC Database" for additional information.

3.5.3 Using DBCA to Create an Oracle RAC One Node Database

If you have selected to install only the Oracle RAC software on cluster nodes, then you can use Oracle Database Configuration Assistant (DBCA) to configure Oracle RAC One Node.

After installation, start DBCA. From the Database Operation page, select the option Create Database. On the Creation Mode page, select Advanced Mode. On the Database Template page, select Oracle RAC One Node database.

Selecting one node deploys Oracle RAC One Node on a single node. Oracle recommends that you select all nodes in the cluster to which you want Oracle RAC One Node to be able to fail over.

If you select less than two nodes, or create server pools with a cardinality of 2 or more, then DBCA posts a warning message that the configuration you select will not support failover of the Oracle RAC One Node instance.

When you create an administrator-managed Oracle RAC One Node database, note that while the database is started on only one of the pool of nodes you installed the binaries, all the candidate servers are placed into the Generic server pool. If the servers are not already in Generic or Free, then this may result in stopping resources that are running on candidate servers.

When you use DBCA to create an Oracle RAC One Node database, a failover service is automatically configured.

3.6 Deleting an Oracle RAC Database Using DBCA

Deleting an Oracle RAC database using DBCA involves first deleting the database, and then removing the database's initialization parameter files, instances, Optimal Flexible Architecture (OFA) structure, and the Oracle network configuration for the database.

To delete a database using DBCA:

  1. Start DBCA on one of the nodes:

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

    DBCA displays the Operations page, displaying different database deployment options.

  2. Select Delete a database, and click Next. DBCA displays a list of all Oracle RAC and single-instance databases running from the Oracle home where DBCA is run.

  3. 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.

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

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

  5. 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 Oracle RAC database from the cluster

  • Deleted high availability services assigned to the Oracle RAC database

  • Deleted the Oracle Net configuration for the Oracle RAC database

  • Deconfigured Oracle Enterprise Manager for the Oracle RAC database

  • Deleted the OFA directory file structure for that Oracle RAC database from the cluster

  • Deleted the Oracle RAC database data files