Skip Headers
Oracle® Real Application Clusters Installation and Configuration Guide
10g Release 1 (10.1.0.3) for Linux x86-64
Part No. B14406-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

D Converting to Real Application Clusters from Single-Instance Oracle Databases

This chapter describes the procedures for converting from Oracle Database 10g single-instance databases to Real Application Clusters (RAC) databases. The topics in this appendix are:

If you are upgrading from Oracle Parallel Server to RAC or from an earlier version of 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 RAC database are the same version of Oracle 10g and running on the same platform.


See Also:

Oracle Database Upgrade Guide for more information about the DBUA

Deciding to Convert

Do not convert to RAC if:

If your platform supports a cluster file system, then you can use it for RAC. You can also convert to RAC and use a non-shared file system. In either case, Oracle strongly recommends that you use Oracle Universal Installer (OUI) to perform an Oracle Database 10g installation that sets up the Oracle home and inventory in an identical location on each of the selected nodes in your cluster.

Prerequisites for Conversion

Your system must meet the following hardware and software requirements to convert to RAC:

Single-Instance to Cluster-Enabled Conversion Administrative Issues

Note the following administrative considerations before conversion:

Converting from Single-Instance to Real Application Clusters

To convert from single-instance Oracle databases to RAC, Oracle strongly recommends that you use the Database Configuration Assistant (DBCA). This is because the 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, Cluster Ready Services (CRS) resources, and the configuration for RAC database management for use by Oracle Enterprise Manager or the SRVCTL utility. This section describes the following scenarios:

Single Instance on a Non-Cluster Machine to Oracle Database 10g with RAC

To convert from a single-instance Oracle database that is on a non-cluster machine to RAC, perform the procedures described under the following headings in the order shown:

Back up the Original Single-Instance Database

Use the DBCA to create a preconfigured image of your single-instance database by invoking the DBCA from the bin directory under ORACLE_HOME and choosing Welcome > Manage Templates > Create a database template [select From an existing database (structure as well as data)] > Database Name [select the database name] > Template Name [enter template name, use database name as the default, and description and template datafile location] > Finish.

The DBCA will generate two files, a database structure file (template_name.dbc) and database preconfigured image file (template_name.dfb). These files are generated by default in the .

Perform the Pre-Installation Steps

Perform the pre-installation steps as documented in Part II of this book. For example, on Linux systems, this includes creating the oracle user account and the dba group on all nodes, setting up oracle user equivalence, set the DBCA_RAW_CONFIG environment variable, and so on. Then set up shared storage by referring to the "Configure Disk Storage for Oracle Database and Recovery Files" sections in the pre-installation chapters in Part II.


See Also:

Storage vendor-specific documentation for setting up the shared disk subsystem and for information about how to mirror and stripe disks

Set up the Cluster

To use vendor clusterware, form a cluster with the required number of nodes according to your vendor's documentation. Once you have configured all of the nodes in your cluster, either with or without vendor clusterware, install CRS by referring to the procedures in Chapter 3, "Installing Cluster Ready Services on Linux Systems".

Copy the Preconfigured Database Image

This includes copying the database structure *.dbc file and the database preconfigured image *.dfb file that the 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 the DBCA.

Install Oracle Database 10g Software with Real Application Clusters

  1. Run the Oracle Universal Installer (OUI) to perform an Oracle installation with the Oracle 10g Database with RAC.

  2. 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 RAC database.

  3. On the OUI Database Configuration Types page, select the Advanced install type.

    After installing the Oracle software, the OUI runs the post installation configuration tools such as the Network Configuration Assistant (NetCA), the DBCA, and so on.

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

  5. 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:

    for more details about the DBCA

  6. After creating the RAC database, the DBCA displays the Password Management page on which you must change the passwords for database privileged users who have SYSDBA and SYSOPER roles. Once the DBCA exits, the conversion process is complete.

Single Instance on a Cluster to Oracle Database 10g RAC

There are three scenarios in which a single-instance database can exist on a cluster machine:

  • Scenario 1: The Oracle home from which the single-instance database is running is cluster installed.

  • Scenario 2: The Oracle home from which the single-instance database is running is cluster installed but the RAC feature is disabled.

  • Scenario 3: The Oracle home from which the single-instance database is running is not cluster installed.

Use the following procedures to convert your single-instance database on a cluster machine to RAC for all of these scenarios.

Single Instance on a Cluster Running from a Cluster Enabled Oracle Home

Perform the following procedures to convert a single-instance database on a cluster running from a cluster installed (Oracle Database 10g with RAC) Oracle home.

  1. Use the 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.

  2. 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 CRS home to the new nodes using the procedures for "Extending Clusterware and Oracle Software to New Nodes" as described in the Oracle Real Application Clusters Administrator's Guide.

  3. 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 the Oracle Real Application Clusters Administrator's Guide.

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

  5. Convert the database using one of the following procedures:

Automated Conversion Procedure

  1. 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 the DBCA to complete the conversion to a RAC database.

  2. Start the 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.

  3. To use raw devices for the cluster database files, on the Initialization Parameters page 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 RAC database, the DBCA displays the Password Management page on which you must change the passwords for database privileged users who have SYSDBA and SYSOPER roles. Once the DBCA exits, the conversion process is complete.

Manual Conversion Procedure

Because you did not use the DBCA to create a preconfigured image of your single-instance database in Step 0, perform the following steps to complete the conversion:

  1. Create the OFA directory structure on all of the nodes that you have added.

  2. 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 command. Otherwise, continue to the next step.

  3. Re-create the control files by executing the CREATE CONTROLFILE SQL statement with the REUSE keyword and specify MAXINSTANCES and MAXLOGFILES, and so on, as needed for your RAC configuration. The MAXINSTANCES recommended default is 32.

  4. Shut down the database instance.

  5. If your single-instance database was using an SPFILE parameter file, then create a temporary PFILE from the SPFILE using the following SQL statement:

    CREATE PFILE='pfile_name' from spfile='spfile_name'
    
    
  6. Set the CLUSTER_DATABASE parameter to TRUE, set the INSTANCE_NUMBER parameter to a unique value for each instance, using a sid.parameter=value syntax.

    If you optimized memory usage on your single-instance database, adjust the size of the SGA to avoid swapping and paging when you convert to RAC. This is because RAC requires about 350 bytes for each buffer to accommodate the Global Cache Service (GCS). For example, if you have 10,000 buffers, RAC requires about 350*10,000 bytes more memory. Therefore, adjust the size of the SGA by changing the DB_CACHE_SIZE and DB_nK_CACHE_SIZE parameters accordingly.

  7. Start up the database instance using the PFILE created in step 5.

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

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

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

  11. Add REMOTE_LISTENER=LISTENERS_DB_NAME and sid.LOCAL_LISTENER=LISTENER_SID parameters to the PFILE.

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

  13. Create the SPFILE from the PFILE using the procedures under the heading "Procedures for Migrating to the Server Parameter File". If you are not using a cluster file system, then ensure that the SPFILE is on a raw device.

  14. Create the file on Windows-based systems that contains the following entry:

    spfile='spfile_path_name'
    
    

    where spfile_path_name is the complete path name of the SPFILE.

  15. Add the configuration for the RAC database and its instance-to-node mapping using SRVCTL.

  16. Start the RAC database using SRVCTL.

After starting the database with SRVCTL, your conversion process is complete and, for example, you can execute the following SQL statement to see the statuses of all the instances in your RAC database:

select * from v$active_instances

Single Instance on a Cluster Running from a RAC-Disabled Oracle Home

On Linux systems, this installation is possible if you performed a one-node cluster (with RAC) installation but later disabled the RAC feature by unlinking it from the oracle binary before creating the single instance database. (However, you can also select the "local", "non-cluster" selection on the Node Selection Page to create a non-RAC-enabled single-instance home on a cluster.) Perform the following procedures to convert this type of single-instance database to a RAC database:

  1. On the cluster node where the single-instance database is running, execute step 0 of "Single Instance on a Cluster Running from a Cluster Enabled Oracle Home".

  2. Change the directory to the lib subdirectory in the rdbms directory under the Oracle home.

  3. Relink the oracle binary by executing the following commands:

    make -f ins_rdbms.mk rac_on
    make -f ins_rdbms.mk ioracle 
    
    
  4. Continue with Step 2.

Single Instance on a Cluster Running from non-Cluster Installed Oracle Home

This installation is only possible if you selected the local installation option on the OUI Specify Hardware Cluster Installation page during an Oracle Database 10g installation.

To covert this database to a RAC database, perform the procedures described under the following headings:

  1. "Back up the Original Single-Instance Database".

  2. "Perform the Pre-Installation Steps".

  3. "Set up the Cluster".

  4. "Install Oracle Database 10g Software with Real Application Clusters". In this step, make sure that you select a new Oracle home other than the one from which the single-instance database was running.

Post-Conversion Steps

After completing the conversion, note the following points as described in the RAC documentation:

The buffer cache and shared pool capacity requirements in RAC are slightly greater than those in single-instance Oracle databases. Therefore, you may wish to increase the size of the buffer cache by about 10% and the size of the shared pool by about 15%.