5 Converting an Existing Database to Oracle RAC or Oracle RAC One Node

You can convert a single-instance database to an Oracle RAC database or an Oracle Real Application Clusters (Oracle RAC) One Node database. You can also convert an Oracle Real Application Clusters (Oracle RAC) One Node database to an Oracle RAC database.

5.1 About Converting an Oracle Database to an Oracle RAC Database

If you have a single-instance database and you want to convert to Oracle RAC or Oracle RAC One Node, then you can use Oracle Enterprise Manager or Database Configuration Assistant (DBCA) to assist you with the task of converting a single-instance database installation to an Oracle Real Application Clusters (Oracle RAC) database.

The Convert to Cluster Database option in Oracle Enterprise Manager Cloud Control provides a GUI conversion tool. Additionally, after you have converted your single-instance database to an Oracle RAC database, you can use the srvctl utility to convert the database to an Oracle RAC One Node database.

5.1.1 About Preparing for Database Conversion

Before you start the process of converting your database to a cluster database, your database environment must meet certain prerequisites.

  • The existing database and the target Oracle RAC database must be on the same release of Oracle Database 12c and must be running on the same platform.

  • The hardware and operating system software used to implement your Oracle RAC database must be certified for use with the release of the Oracle RAC software you are installing.

  • You must configure shared storage for your Oracle RAC database. You will need additional shared storage for the Oracle Clusterware files, such as the Oracle Cluster Registry, the voting files, and the Grid Infrastructure Management Repository.

  • You must verify that any applications that run against the Oracle RAC database do not need any additional configuration before they can be used successfully with the cluster database. This applies to both Oracle applications and database features, such as Oracle Streams, and applications and products that do not come from Oracle.

  • Backup procedures should be available before converting from a single-instance Oracle Database to Oracle RAC.

  • For archiving in Oracle RAC environments, the archive log file format requires a thread number.

  • The archived redo log files 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, or some other means to provide shared file systems, then you require a method of accessing the archived redo log files from all nodes on which the cluster database has instances.

Note:

For information about using individual Oracle Database 12c database products or options, refer to the product documentation library, which is available on the Oracle Help Center website at http://docs.oracle.com/en/database/

5.1.2 Overview of the Database Conversion Process Using Cloud Control

You can convert a single-instance database to an Oracle RAC database using Oracle Enterprise Manager Cloud Control.

This section summarizes the process of converting a single-instance database to an Oracle RAC database:

  • Complete the prerequisite tasks for converting to an Oracle RAC database:

    • Oracle Clusterware and Oracle Database software is installed on all target nodes.

    • Oracle Clusterware is started.

    • The Oracle Database binary is enabled for Oracle RAC on all target nodes.

    • Shared storage is configured and accessible from all nodes.

    • User equivalency is configured for the operating system user performing the conversion.

    • Enterprise Manager agents are configured and running on all nodes, and are configured with the cluster and host information.

    • The database being converted has been backed up successfully.

  • Access the Database Home page for the database you want to convert. For instructions on navigating to the Database Home page, see "Accessing the Database Home Page" in the Oracle Database 2 Day DBAGuide.

  • From the Availability menu, select Convert to Cluster Database.

  • Provide the necessary credentials.

  • Select the host nodes that should contain instances of the new database.

  • Provide listener and instance configuration information.

  • Specify the location of the shared storage to be used for the data files.

  • Submit the job.

  • Complete the post-conversion tasks.

The resulting Oracle RAC database uses a server pool instead of a fixed configuration.

See Also:

Oracle Real Application Clusters Administration and Deployment Guide for a complete description of this process

5.2 Converting a Single Instance Database to Oracle RAC Using DBCA

If you have a single instance database running on a cluster node, you can convert the database to Oracle RAC or Oracle RAC One Node using Database Configuration Assistant (DBCA).

  1. Change directory to $ORACLE_HOME/bin.
  2. Start DBCA.
    $ dbca
  3. In the Welcome window, click Next.
  4. On the Operations page, select Manage Templates, and click Next
  5. On the Template Management page, select Create a database template and From an existing database (structure as well as data), then click Next
  6. On the Source Database page, select the database name in the Database instance list, and click Next
  7. In a separate window, use SQL to ensure that all pluggable databases (PDBs) are open, as follows:
    SQL> SELECT name, open_mode FROM v$pdbs;

    If any of the PDBs are in a state other than OPEN, then open them using SQL.

  8. 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. You can enter a description of the file in the Description field. Change the template file location in the Template data file field to a temporary location outside of the Oracle home.

    When you have completed the entries, click Next.

  9. 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 (template_name.dbc), and a database preconfigured image file (template_name.dfb).
  10. Start DBCA again.
  11. From the Welcome window, select Oracle RAC One Node database.
  12. On the DBCA Template Selection page, use the template that you copied to a temporary location in Step 8. Use the Browse option to select the template location.
  13. Select the option that you want to deploy.

    Your choices are the following: Oracle RAC database; Oracle RAC One Node database; or Oracle single-instance database.

5.3 Converting an Oracle RAC Database into an Oracle RAC One Node Database

After you convert a single-instance Oracle database into a single-node Oracle RAC database, you can use the srvctl utility to convert the database into an Oracle RAC One Node database.

To convert your database to an Oracle RAC One Node database, use the following command:

srvctl convert database -db database_name -dbtype RACONENODE

An Oracle RAC One Node database must be part of a multi-node cluster to support failover or online database relocation. You must either install Oracle Grid Infrastructure for a cluster and Oracle RAC on at least two nodes, or add a node to your existing single-node Oracle RAC database.

See Also:

5.4 Converting a Database from Oracle RAC One Node to Oracle RAC

You can convert an Oracle RAC One Node database to an Oracle RAC database.

You can perform the conversion by logging in as the Oracle RAC One Node database owner and entering the following SRVCTL command:

srvctl convert database -db db_unique_name -dbtype RAC

If you are relocating the database you want to convert to Oracle RAC using online database relocation, or an online database relocation has failed, then you must either quit or complete the relocation before you run the srvctl convert database command.

Converting an administrator-managed Oracle RAC One Node database to an Oracle RAC database configures all database services so that the single-instance database is the preferred instance for that service. After you convert the database, you can add instances to your database by using the srvctl add instance command.

Converting a policy-managed Oracle RAC One Node database to an Oracle RAC database sets all database services to UNIFORM cardinality. It also results in reusing the server pool in which the database currently runs. The conversion reconfigures the database to run on all nodes in the server pool. The command does not start any additional instances but running the srvctl start database command starts the database on all nodes in the server pool.

See Also:

srvctl convert database for more information about this command