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:
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for information about using DBCA to add and delete instancesDBCA has the following primary database functions:
Create and delete databases
Create database templates
Add and delete database instances
Register databases in Oracle Enterprise Manager Cloud Control
Configure and register database options (such as Oracle Database Vault) 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:
"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 more 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.
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. 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.
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 might not be able to connect to any databases that are registered to the listener that is being migrated.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 -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.
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 Grid home C:\app\12.1.0\grid
, and with the Oracle home path C:\app\oracle\product\12.1.0\dbhome_1
, enter the following command:
C:\app\12.1.0\grid\bin> cluvfy stage -pre dbcfg -n node1,node2 \ -d C:\app\oracle\product\12.1.0\dbhome_1
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 CVU summary indicates that the cluster verification check fails, then review and correct the relevant system configuration steps, and run the test again.
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. You do not need to set 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 from either DBCA or OUI.This section contains the following topics:
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:
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.
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.
On Windows-based systems, if you plan to use Oracle ASM storage, then before you use DBCA to create a database, you must first create logical partitions without primary partitions on the disk drives. After creating the logical disk partitions you must delete the drive letters for these partitions on all nodes. Alternatively, you can stamp these partitions with asmtool
.
After you have configured the disks to be used by Oracle ASM, you must create the disk groups that will be used by the database before starting DBCA. You can create disk groups by using SQL*Plus, Oracle Enterprise Manager, or Oracle ASM Configuration Assistant (ASMCA).
See Also:
Oracle Database Installation Guide for Microsoft Windows for more information about asmtoolg
Oracle Grid Infrastructure Installation Guide for your platform more information on shared storage configuration requirements
Oracle Automatic Storage Management Administrator's Guide for more information about creating disk groups
When using DBCA to create an Oracle database, or an Oracle RAC database, if an Oracle Home User was specified when the Oracle Database software was installed, then you will need to enter the password for this user when you create the database.
Figure 3-1 Specifying the Password for the Oracle Home User
See Also:
Oracle Grid Infrastructure Installation Guide for Microsoft Windows x64 (64-Bit) for information about Oracle Home Users.The following topics in this section describe how to use DBCA to create and configure an Oracle RAC database:
Using DBCA to Select Storage to Use With Oracle RAC Database
Using DBCA to Specify Database Initialization Parameters for Oracle RAC
To start DBCA, log in as an Administrator user. The user should also be a member of ORA_DBA or ORA_Homename_DBA group and should also be a member of ORA_ASMDBA if Oracle ASM is used as storage for the Oracle RAC database. You are prompted to enter the password for the Oracle Home User if you are administering an Administrator-managed Oracle RAC database and chose not to store the password in an Oracle Wallet.
Enter the command dbca
from the Oracle_home
\bin
directory. On Windows-based platforms, you can also use the following method to start DBCA:
Click Start.
Select Programs.
Under Programs, select Oracle - Oracle_home name.
Select Configuration and Migration Tools.
Select Database Configuration Assistant.
After you have started DBCA, to create an Oracle RAC database, you select the following:
Create Database on the Database Operation/Welcome page
Advanced Mode on the Creation Mode page
Oracle RAC database on the Database Template page
Note:
To run DBCA, you no longer need to set 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 still need to configure the ORACLE_UNQNAME parameter.When you start DBCA, it automatically shows options for Oracle RAC if it detects from the central Oracle Inventory that the Oracle Home is enabled for Oracle RAC.
If DBCA does not detect the Oracle home as an Oracle RAC home, check that the OUI inventory is correctly located in the directory C:\Program Files\Oracle\Inventory
, and that the oraInventory
file is not corrupted. Also, perform clusterware diagnostics by using the following CVU command syntax:
Grid_home\bin\cluvfy\cluvfy.bat stage -post crsinst -n nodelist
For example, if the Grid Home is D:\app\12.1.0\grid
, and the nodes are named node1
and node2
, then run the following command:
D:\app\12.1.0\grid\bin> cluvfy stage -post crsinst -n node1,node2
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.
You can choose to use either Oracle ASM Disk groups or a shared file system as storage for Oracle RAC database files.
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 home before starting DBCA.
If you are using Oracle ASM, then you can also select the Fast Recovery Area and size on this page.
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.
See Also:
Oracle Database Administrator's Guide for information about initialization parametersAfter 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 Oracle services if you are on a Windows-based platform
Starts the Oracle Clusterware high availability services
Starts the database instances across cluster nodes
Caution:
After you have created the Oracle RAC database, to install additional Oracle Database products in the Oracle RAC database you have created, 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 Real Application Clusters Database" for additional information.
This section describes how to install and create an Oracle RAC database that uses Direct NFS (dNFS) for storage. There are different configuration processes you must perform to use dNFS for your database file system.
In a software-only installation you install the Oracle Database software but do not create a database as part of the installation process.
Start OUI by running setup.exe
from the software staging location.
On the Select Installation Option screen select "Install database software only".
On the Grid Installation Options screen, select the product to install, for example "Oracle Real Application Clusters database software installation."
Select the nodes on which you want to install the database software.
Choose the languages to use with the installed software.
Select the database edition to install. For Oracle RAC databases, you must choose Enterprise Edition.
Specify an Oracle Home user, or choose to use a Windows-built in user for the software installation owner.
On the Specify Installation Location screen, enter a path to the Oracle base directory and the software location (Oracle home directory).
On the Summary screen, verify your selections, then click Install.
ASMCA enables you to create a ACFS mount point which will be used in the "common file location" step of DBCA.
When creating Oracle ACFS file systems on Windows, run ASMCA as a Windows domain user who is also an administrator of the computer.
From the Grid_home
/bin
directory, run asmca.exe
to start the Oracle ASM Configuration Assistant.
Select the Disk Groups tab.
Right-click Disk Group Name and select Create ACFS for Database use.
In the Create ACFS for Database window specify the mount point location, volume name, and size, then click OK.
For example, you might specify the following:
Mount Point: C:\oradatamnt
Volume Name: dbnfs
Size (GB): 70
Click OK in the informational pop-up window that appears. This window summarizes the actions performed by ASMCA.
Select the ASM Cluster File Systems tab.
The mount point you just created should be displayed on this page.
See Also:
Oracle Automatic Storage Management Administrator's Guide for more information about creating an Oracle ACFS file system for database useUse DBCA to create an Oracle database.
From the Oracle_home
\bin
directory, run dbca.exe
to start the Database Configuration Assistant.
On the Database Operation screen, select Create Database.
On the Creation Mode screen, select Advanced Mode.
On the Database Template screen, select Oracle Real Application Clusters (RAC) database for the Database Type.
For the Configuration Type, you can choose either Policy-Managed or Administrator-Managed. Select the template most appropriate for the type of database you want to create.
For the next four screen, make selections and provide information that best meet your business requirements.
On the Storage Locations screen, select File System for the Database files Storage type. Select the option Use Common Location for All Database Files. In the File location field, specify the location of the mount point you created in "Use ASMCA to Configure an ACFS Mount Point," for example, C:\oradatamnt
.
On the Specify Database Options screen, choose any additional configuration you want for your database.
On the Initialization Parameters screen, use the default settings, or provide customized values for the initialization parameters.
On the Creation Options screen, select the option "Generate Database Creation Scripts." Specify a destination directory for the script file, or use the default value.
After the Prerequisite checks complete, on the Summary screen, minimize the installation window. DO NOT click Finish at this point.
Enable the Direct NFS option as described in "Enable and Configure Direct NFS.".
Remove the virtual mount point you created with ASMCA, as described in "Use ASMCA to Remove the ACFS Mount Point."
Create all the directories needed locally on each node as well as on the NFS server. For this example, you would create the following, where orcl
represents the database SID and pdb1
represents the Pluggable Database (PDB) name:
On each node, create the directory c:\oracle\oradatamnt\orcl\pdb1
On the NFS server, create the directory /export/abcd/orcl/pdb1
Return to the DBCA window and click Finish.
Run the generated scripts on the cluster node to create the database.
Map a drive letter to a CIFS share on the NFS server that represents the location of the database files.
Use a command similar to the following:
NET USE * \\filer\vol0\orcl
After you complete this step, both Oracle and the Windows OS can access the location where the database files reside. Oracle is using DNFS, but the Windows OS uses CIFS to access the same location on the NFS server.
Verify Direct NFS is configured for the database.
Start SQL*Plus.
Connect to the newly created database as a DBA user.
Run the following SQL command:
SELECT * FROM v$dnfs_servers;
To enable the Direct NFS option, run the program Oracle_home
\bin\enable_dnfs.bat.
You must also create an oranfstab
file. See Oracle Grid Infrastructure Installation Guide for Microsoft Windows x64 (64-Bit) for details.
Now you have configured the mount point using Direct NFS, you can remove the ACFS mount point using ASMCA.
When creating Oracle ACFS file systems on Windows, run ASMCA as a Windows domain user who is also an administrator of the computer.
From the Grid_home
/bin
directory, run asmca.exe
to start the Oracle ASM Configuration Assistant.
Select the ASM Cluster File System tab.
Select the mount point created earlier (C:\oradatamnt
), then click Dismount All.
Select the Volumes tab.
Right-click the mount point you created in "Use ASMCA to Configure an ACFS Mount Point," then select Delete.
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.
See Also:
Oracle Technology Network for more information about Oracle RAC One Node:http://www.oracle.com/technetwork/database/clustering/overview/
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 run on candidate servers.
See Also:
Oracle Database Concepts and Oracle Real Application Clusters Administration and Deployment Guide for more information about PDBs and adding servicesDeleting 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:
Start DBCA on one of your cluster nodes:
See "Starting DBCA".
DBCA displays the Operations page, displaying different database deployment options.
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.
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 you have configured DBCA 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 and password files.
At this point, you have accomplished the following:
Deleted the selected Oracle RAC database from the cluster
Deleted the selected Oracle RAC Database Oracle services on Windows-based platforms
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 structure for that Oracle RAC database from the cluster
Deleted the Oracle RAC database data files
During installation, if you select a multitenant container database (CDB), and configure pluggable databases (PDBs), then Oracle recommends that you add services to the PDBs after installation. If you do not add services to PDBs, and then the Oracle RAC One Node CDB fails over to another node, or you manually relocate the CDB to another node, then by default, all PDBs associated with that CDB that do not have registered services are restarted in MOUNTED
state.
PDBs are opened in Read Write
mode after failover or relocation only after you have configured the PDBs to have associated services. If you have not associated services to PDBs, then the PDBs remains in MOUNTED
state when the CDB instance restarts.
To add services to a PDB, use the following srvctl
command syntax, where cdbname
is the name of the CDB, service_name
is the name of the service, and pdbname
is the name of the PDB:
srvctl add service -d cdbname -s service_name -pdb pdbname
After you add services to your PDBs, if you relocate the CDB with which the PDBs are associated, or the CDB fails over, then the PDBs associated with that CDB automatically open in Read Write
state.