If you are upgrading from Oracle Parallel Server to Oracle RAC or from an earlier version of Oracle RAC, then use the Database Upgrade Assistant (DBUA). In other words, the procedures in this chapter assume that your original single-instance database and the target Oracle RAC database are the same version of Oracle 10g, and running on the same platform.
See Also:Database Licensing Information to understand the restrictions of your license. You must comply with the restrictions of the license you have purchased.
Your system must meet the following hardware and software requirements to convert to Oracle RAC:
A supported hardware and operating system software configuration
Use OCFS or shared disks
Before converting your database, refer to the Oracle Database Licensing Information manual to understand the scope of your license.
Additional archiving considerations apply in Oracle RAC environments. In particular, the archive file format requires a thread number. In addition, the archived logs from all instances of an Oracle RAC database are required for media recovery. If you archive to a file and you do not use a cluster file system, then a method of accessing the archive logs from all nodes on which the cluster database has instances is required where file systems are not shared.
To convert from single-instance Oracle databases to Oracle RAC, Oracle strongly recommends that you use the Database Configuration Assistant (DBCA). This is because DBCA automates the configuration of the control file attributes, creates the undo tablespaces and the redo logs, and makes the initialization parameter file entries for cluster-enabled environments. It also configures the Oracle Net Services, Oracle Clusterware resources, and the configuration for Oracle RAC database management for use by Oracle Enterprise Manager or the SRVCTL utility. This section describes the following scenarios:
Use DBCA to create a preconfigured image of your single-instance database by using the following procedure:
Navigate to the bin directory in ORACLE_HOME, and start DBCA.
At the Welcome page, click Next.
On the Operations page, select Manage Templates, and click Next.
On the Template Management page, select Create a database template and From an existing database (structure as well as data), and click Next.
On the Source Database page, enter the SID prefix in the Database instance field, and click Next.
On the Template Properties page, enter a name for your template in the Name field. Oracle recommends that you use the database name.
By default, the template files are generated in the directory
%ORACLE_HOME%\assistants\dbca\templates directory on Windows-based systems. If you choose to do so, you can enter a description of the file in the Description field, and change the template file location in the Template datafile field.
When you have completed entries, click Next.
On the Location of Database Related Files page, select Maintain the file locations, so that you can restore the database to the current directory structure, and click Finish.
DBCA generates two files: a database structure file (
.dbc), and a database preconfigured image file (
Perform the pre-installation steps as documented in chapters Chapter 2, "Server and Network Pre-Installation Tasks"and Chapter 3, "Storage Pre-Installation Tasks"in Part II of this book.
See Also:Storage vendor-specific documentation for setting up the shared disk subsystem and for information about how to mirror and stripe disks
Form a cluster with the required number of nodes according to your hardware vendor's documentation. When you have configured all of the nodes in your cluster, either with or without vendor clusterware, then install Oracle Clusterware and validate cluster components by referring to the procedures in Chapter 4, "Installing Oracle Clusterware on Windows-Based Systems".
Validate the cluster configuration using the Cluster Verification Utility, as described in Chapter 5, "Installing Oracle Database 10g with Oracle Real Application Clusters".
Copy the preconfigured database image. This includes copying the database structure
*.dbc file and the database preconfigured image
*.dfb file that DBCA created in the previous procedure "Back up the Original Single-Instance Database" to a temporary location on the node in the cluster from which you plan to run DBCA.
Run the Oracle Universal Installer (OUI) to perform an Oracle installation with the Oracle 10g Database with Oracle RAC.
Select Cluster Installation Mode on the Specify Hardware Cluster Installation page of the Oracle Universal Installer (OUI) and select the nodes to include in your Oracle RAC database.
On the OUI Database Configuration Types page, select the Advanced install type.
After installing the Oracle software, the OUI runs post-installation configuration tools, such as the Network Configuration Assistant (NetCA), DBCA, and so on.
On the DBCA Template Selection page, use the template that you copied to a temporary location in the "Copy the Preconfigured Database Image" procedure. Use the browse option to select the template location.
If you selected raw storage on the OUI Storage Options page, then on the DBCA File Locations Tab on the Initialization Parameters page, replace the data files, control files, and log files, and so on, with the corresponding raw device files if you have not setup the
DBCA_RAW_CONFIG environment variable. You must also replace default database files with raw devices on the Storage page.
See Also:Chapter 6, "Creating Oracle RAC Databases with the Database Configuration Assistant" for more details about DBCA
After creating the Oracle RAC database, DBCA displays the Password Management page on which you must change the passwords for database privileged users who have
SYSOPER roles. When DBCA exits, the conversion process is complete.
Use the following procedures to convert your single-instance database on a cluster computer to Oracle RAC for all of these scenarios.
Perform the following procedures to convert a single-instance database on a cluster running from a cluster-installed (Oracle Database 10g with Oracle RAC) Oracle home.
Use DBCA to create a preconfigured image of your single-instance database as described under the heading "Back up the Original Single-Instance Database". To perform the conversion manually, shut down the single-instance database.
To add nodes to your cluster, add and connect these nodes to the cluster as described under the heading "Perform the Pre-Installation Steps". Ensure that all of these nodes can access the shared storage. Also extend the Oracle Clusterware home to the new nodes using the procedures for "Extending Clusterware and Oracle Software to New Nodes" as described in Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide.
From the existing Oracle home, extend this home to the new nodes using the procedure "Adding Nodes at the Oracle RAC Database Layer" as described in Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide.
From one of the newly added nodes, configure the listeners on the additional nodes using the NetCA. Choose the same port number and protocol that you used on the existing node. If the NetCA displays the existing node in the node list page, then do not select this node, because the listener is already configured on it.
Convert the database using one of the following procedures:
If you created the preconfigured image of the single instance database as described under the heading "Back up the Original Single-Instance Database", then use DBCA to complete the conversion to an Oracle RAC database by completing the following steps:
Start DBCA from the initial node. Select the names of the nodes that you want to include as part of your cluster database. On the Template Selection page, select the preconfigured template that you created in Step 0. Enter the database name and respond to the remaining DBCA prompts.
To use raw devices for the cluster database files: When the Initialization Parameters page appears, enter the raw device name for the SPFILE on the File Locations tab. On the Storage page, replace the default database file names with the raw devices for the control files, redo logs, and datafiles to create the cluster database. Click Finish, and create the database.
After creating the Oracle RAC database, DBCA displays the Password Management page on which you must change the passwords for the database privileged users who have
SYSOPER roles. When DBCA exits, the conversion process is complete.
If you did not use DBCA to create a preconfigured image of your single-instance database in Step 0, then perform the following steps to complete the conversion:
Create the OFA directory structure on each of the nodes that you have added.
See Also:"Directory Structures for Real Application Clusters" for more information about OFA.
If you are converting single-instance database files on a file system to raw devices, then copy the database datafiles, control files, redo logs, and server parameter file to their corresponding raw devices using the
OCOPY command on Windows-based systems. Otherwise, continue to the next step.
Re-create the control files by running the
CREATE CONTROLFILE SQL statement with the
REUSE keyword and specify
MAXLOGFILES, and so on, as needed for your Oracle RAC configuration. The
MAXINSTANCES recommended default is 32.
Shut down the database instance.
CREATE PFILE='pfile_name' from spfile='spfile_name'
CLUSTER_DATABASE parameter to
TRUE, set the
INSTANCE_NUMBER parameter to a unique value for each instance, using a
If you optimized memory usage on your single-instance database, then adjust the size of the SGA to avoid swapping and paging when you convert to Oracle RAC. you should make this adjustment because Oracle RAC requires about 350 bytes for each buffer to accommodate the Global Cache Service (GCS). For example, if you have 10,000 buffers, then Oracle RAC requires about 350*10,000 bytes more memory. Therefore, adjust the size of the SGA by changing the
DB_nK_CACHE_SIZE parameters accordingly.
Start up the database instance using the PFILE created in step 5.
If your single-instance database was using automatic undo management, then create an undo tablespace for each additional instance using the
CREATE UNDO TABLESPACE SQL statement. If you are using raw devices, then ensure that the datafile for the undo tablespace is on the raw device.
Create redo threads that have at least two redo logs for each additional instance. If you are using raw devices, then ensure that the redo log files are on raw devices. Enable the new redo threads by using an
ALTER DATABASE SQL statement. Then shutdown the database instance.
Copy the Oracle password file from the initial node, or from the node from which you are working, to the corresponding location on the additional nodes on which the cluster database will have an instance. Make sure that you replace the
ORACLE_SID name in each password file appropriately for each additional instance.
SID parameters to the PFILE.
Configure the net service entries for the database and instances and address entries for the
LOCAL_LISTENER for each instance and
REMOTE_LISTENER in the
tnsnames.ora file and copy it to all nodes.
Create the SPFILE from the PFILE. If you are not using a cluster file system, then ensure that the SPFILE is on a raw device.
%ORACLE_HOME%\database\initSID.ora file on Windows-based systems that contains the following entry:
spfile_path_name is the complete path name of the SPFILE.
Add the configuration for the Oracle RAC database and its instance-to-node mapping using SRVCTL.
Start the Oracle RAC database using SRVCTL.
After starting the database with SRVCTL, your conversion process is complete and, for example, you can run the following SQL statement to see the statuses of all the instances in your Oracle RAC database:
select * from gv$active_instances
Follow the recommendations for using load balancing and Transparent Application Failover as described in the Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
Use locally managed tablespaces instead of dictionary managed tablespaces to reduce contention and manage sequences in Oracle RAC as described in the Oracle Real Application Clusters Deployment and Performance Guide
Follow the guidelines for configuring an interconnect, for using automatic segment space management, and for using SRVCTL to administer multiple instances, as described in the Oracle Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
The buffer cache and shared pool capacity requirements in Oracle RAC are slightly greater than the requirements for single-instance Oracle databases. Therefore, you should increase the size of the buffer cache by about 10% and the size of the shared pool by about 15%.