Skip Headers

Oracle9i Real Application Clusters Setup and Configuration
Release 2 (9.2)

Part Number A96600-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page Go to next page
View PDF

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

This chapter describes the procedures for converting from single-instance Oracle databases to Real Application Clusters databases. The topics in this chapter are:

If you are upgrading from Oracle Parallel Server to Real Application Clusters, then use the Database Upgrade Assistant (DBUA).

See Also:

Oracle9i Database Migration for more information on the DBUA

Considerations Before Converting

Consider the information described in the following sections before beginning your conversion:

Deciding to Convert

Do not convert to Real Application Clusters if:

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

Prerequisites for Conversion

Your system must meet the following hardware and software requirements to convert to Real Application Clusters:

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 Real Application Clusters, Oracle Corporation 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 and static configuration for Real Application Clusters database management using Oracle Enterprise Manager (EM) or the SRVCTL utility. This section describes the following scenarios:

Single Instance on a Non-Cluster Machine to Oracle9i Real Application Clusters

To convert from a single-instance Oracle database that is on a non-cluster machine to Real Application Clusters, perform the following procedures:

Back up the Original Single-Instance Database

  1. Use the DBCA to create a seed 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 instance [select the database instance name] > Template Name [enter template name, use database instance as the default, and description] > Finish.

    The DBCA will generate two files, a database structure file (<template_name>.dbc) and database seed image file (<template_name>.dfj). These files are generated by default in the ORACLE_HOME/assistants/dbca/templates directory on UNIX and in the %ORACLE_HOME%\assistants\dbca\templates directory on Windows platforms.

Set up Cluster

  1. Connect the required number of nodes to the cluster interconnect and the shared storage subsystem.
  2. Install the cluster software and any required Oracle operating system-dependent (OSD) patches such as the Oracle UDLM patch for Sun Clusters.

    For UNIX platforms, refer to your vendor's operating system-dependent documentation for instructions about installing the cluster software. For Sun clusters, also install the Oracle UDLM patch from the first CD of the Oracle9i Enterprise Edition CD set.

    For Windows NT and Windows 2000, use the Oracle-supplied clustersetup tool to install the Oracle OSD clusterware.

  3. Configure your cluster by adding the desired number of nodes.
  4. Start up the clusterware on all nodes of your cluster.

Set up Shared Storage

  1. If your platform supports a cluster file system, then set up the cluster file system on shared storage. For example, on Windows NT and Windows 2000, install the Oracle Cluster File System (CFS) software on all nodes of the cluster. Then from any node, create two unformatted raw partitions on shared disks and format these partitions as CFS volumes.
  2. If your platform does not support a cluster file system or you want to use raw devices for database files for performance reasons, then install the vendor specific logical volume manager (for example, Veritas Cluster Volume Manager) and set up raw devices on shared disks.

    See Also:

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

  1. Start up the shared storage management components such as Logical Volume Manager, Veritas Volume Cluster Manager, and so on.

Copy the Seed Database Image

This includes copying the database structure *.dbc file and the database seed image *.dfj file that the DBCA created in the step "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.

Pre-Installation Steps

Perform the pre install steps as documented in your platform-specific Oracle documentation. For example, on UNIX platforms, this includes creating the oracle user account and the dba group on all nodes, setting up oracle user equivalence, setting up the SRVM_SHARED_CONFIG and DBCA_RAW_CONFIG environment variables, and so on.

See Also:

Chapter 2 for setting up the DBCA_RAW_CONFIG and Chapter 3 for setting up SRVM_SHARED_CONFIG for more details.

Install Oracle Software

  1. Run the Oracle Universal Installer (OUI) to perform an Oracle installation with the Enterprise Edition and Real Application Clusters features.
  2. Select the nodes and the same database options that you used in the original database installation.

    The Real Application Clusters option will be automatically installed when the OUI runs on a cluster and the OUI will install the Oracle9i software in the new Oracle home.

  3. On the OUI Database Configuration Types page, select the Customized install type and use the template that you copied to a temporary location in the"Copy the Seed Database Image" procedure. Use the browse option to select the template location.

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

  4. On the DBCA File Locations Tab on the Initialization Parameters page and also on the Storage 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. When the DBCA finishes, you have successfully converted from a single-instance Oracle database to a Real Application Clusters database.

    See Also:

    Chapter 2 and Chapter 3 for more details

After creating the Real Application Clusters 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 Oracle9i Real Application Clusters

There are three possible scenarios under which a single-instance database can exist on a cluster machine.

Use the following procedures to convert your single-instance database on a cluster machine to Real Application Clusters 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 (Oracle9i Enterprise Edition with Real Application Clusters) Oracle home.

  1. Use the DBCA to create a seed image of your single-instance database as in "Back up the Original Single-Instance Database". To perform the conversion manually, shut down the single-instance database.
  2. If you need to add nodes to your cluster, add and connect these nodes to as described in "Set up Cluster". Ensure that all of these nodes can access the shared storage.
  3. If you are not using a cluster file system for the existing Oracle home, then from one of the newly added nodes, install the Oracle software on the additional nodes using the Software Only Install Type of the OUI. Ensure that the ORACLE_HOME path name is same as on the existing node from which the single-instance database was running. Also make sure that you do not select the existing node on the Cluster Node Selection page of the OUI; Oracle software is already installed on this node.
  4. From the same node from which you ran the OUI in the previous step, configure the listeners on the additional nodes using the NetCA, choosing 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. Set up the Server Configuration file:
    1. On UNIX platforms, create the file srvConfig.loc on all nodes. The file must contain the following entry:
      srvconfig_loc= path_name
      
      

      Where path_name is the complete path name for the shared configuration file.

      The srvConfig.loc file usually resides in the /var/opt/oracle directory. However, on HPUX, it resides in the /etc directory.

    2. On Windows platforms, if you do not use a cluster file system, then create a symbolic link called srvcfg to point to a raw partition using OLM.
    3. For all platforms, execute the srvconfig -init command from one of the nodes to initialize the configuration.
  6. Start the Global Services Daemon (GSD)
    1. On UNIX platforms, execute the gsdctl start command on each of the nodes to start the GSD.
    2. On Windows platforms, install the GSDService by executing the gsdservice -install command and then start the GSD by executing the gsdctl start command on each of the nodes.
  7. Convert the database using either the automated or manual procedure:
    1. Automated Conversion Procedure: If you created the seed image of the single instance database in "Back up the Original Single-Instance Database", then use the DBCA to complete the conversion to a Real Application Clusters 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 seed template that you created in Step 1. 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 Real Application Clusters 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.

    1. Manual Conversion Procedure: Because you did not use the DBCA to create a seed image of the single-instance database in Step 1, perform the following steps to complete the conversion:
    2. Create the OFA directory structure on all additional nodes that you have added.

      See Also:

      "UNIX Directory Structures for Real Application Clusters" for more information about OFA

    1. If you are converting the single-instance database files on file system to raw devices, then copy the database datafiles, control files, redo logs, and sever parameter file to their corresponding raw devices using the dd command on UNIX or the OCOPY command on Windows platforms. Otherwise, continue to the next step.
    2. 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 Real Application Clusters configuration. The MAXINSTANCES recommended default is 32.
    3. Shut down the database instance.
    4. If your single-instance database was using an SPFILE parameter file, then create a temporary PFILE from the SPFILE using the procedures under the heading "Backing Up the Server Parameter File in Real Application Clusters".
    5. 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 Real Application Clusters. This is because Real Application Clusters requires about 350 bytes for each buffer to accommodate the Global Cache Service (GCS). For example, if you have 10,000 buffers, Real Application Clusters 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.

    6. Start up the database instance using the PFILE created in step f.
    7. 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.
    8. If your single-instance database was using manual undo management, then create at least two private rollback segments for each additional instance using the CREATE ROLLBACK SEGMENTS SQL statement. Also set the ROLLBACK_SEGMENTS parameter for each instance using the syntax <sid>.ROLLBACK_SEGMENTS=(RBS<i>, RBS<j>) in the parameter file.
    9. Create a redo thread having at least two redo group 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 threads by using an ALTER DATABASE SQL statement. Then shutdown the database instance.
    10. Copy the Oracle password file from the initial node, or 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. Also, configure the static service entries in the listener.ora file on each node.
    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 $ORACLE_HOME/dbs/initSID.ora file on UNIX platforms or %ORACLE_HOME%\database\initSID.ora file on Windows platforms that contains the following entry:
      spfile=<spfile_pathname> 
      
      

    Where <spfile_pathname> is the complete pathname of the spfile.

  1. Add the configuration for the Real Application Clusters database and its instance-to-node mapping using SRVCTL.
  2. Start the Real Application Clusters database using SRVCTL.

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

select * from v$active_instances

Single Instance on a Cluster Running from Real Application Clusters-Disabled Oracle Home

On UNIX platforms, this installation is possible if you performed one node cluster (Enterprise Edition with Real Application Clusters) installation but later disabled the Real Application Clusters feature by unlinking it from the oracle binary before creating the single instance database. Perform the following procedures to convert this type of single-instance database to a Real Application Clusters database:

  1. On the cluster node where the single-instance database is running, execute step 1 of "Single Instance on a Cluster Running from a Cluster Enabled Oracle Home".
  2. Change the directory to the lib sub-directory 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 shut down the cluster manager software before running the OUI to perform an Oracle9i installation. This is the way Oracle9iAS is installed on a cluster machine to only leverage the hardware redundancy provided by a cluster.

To covert this database to a Real Application Clusters database, perform the steps as follows:

  1. "Back up the Original Single-Instance Database"
  2. "Set up Cluster"
  3. "Set up Shared Storage"
  4. "Pre-Installation Steps"
  5. "Install Oracle Software"
  6. In step "Install Oracle Software", 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 Real Application Clusters documentation: