Converting to Oracle RAC and Oracle RAC One Node Using Oracle DBCA

Learn about guidelines and procedures for using Oracle DBCA to convert from single-instance Oracle AI Database to Oracle Real Application Clusters (Oracle RAC) or Oracle RAC One Node databases.

Overview of Converting Databases to Oracle RAC Using Oracle DBCA

Oracle DBCA provides certain benefits that can assist you with converting from single-instance Oracle AI Database to Oracle Real Application Clusters (Oracle RAC) or Oracle RAC One Node databases.

Oracle DBCA automates the configuration of the control file attributes, creates the undo tablespaces and the redo logs, and creates the initialization parameter file entries for cluster-enabled environments. Oracle DBCA also configures Oracle Net Services, Oracle Clusterware resources, and the configuration for Oracle RAC database management using Oracle Enterprise Manager or the Server Control utility (SRVCTL).

Before you use Oracle DBCA to convert a single-instance database to an Oracle RAC or an Oracle RAC One Node database, ensure that your system meets the following conditions:

  • Your system uses supported hardware and operating system software. Your system is configured properly to support an Oracle RAC database.
  • The nodes have access to shared storage; for example, either Oracle Cluster File System or Oracle ASM is available and accessible from all nodes. On Linux on POWER systems, ensure that GPFS is available and accessible from all nodes.

    Note:

    If your cluster is a single node cluster installed with Oracle Grid Infrastructure to Manage Generic Applications, the database can also be on local file systems.

  • Your applications have no design characteristics that preclude their use with cluster database processing.

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

Related Topics

Converting Oracle AI Database Installations to Oracle RAC Using Oracle DBCA

To convert from a single-instance Oracle AI Database that is on a non-clustered computer to Oracle Real Application Clusters (Oracle RAC), complete each of the procedures described here.

Caution:

You must perform each of the procedures described in the following sections, and in the order shown.

Use Oracle DBCA to Create an Image of the Single-Instance Database

To create a preconfigured image of your single-instance database as part of your conversion process from a single instance database to Oracle Real Application Clusters (Oracle RAC) database, use this Oracle DBCA procedure.

  1. Navigate to the bin directory in $ORACLE_HOME, and start Oracle DBCA.
  2. At the Welcome page, click Next.
  3. On the Operations page, select Manage Templates, and click Next.
  4. On the Template Management page, select Create a database template and From an existing database (structure as well as data), then click Next.
  5. On the Source Database page, select the database name in the Database instance list, and click Next.
  6. Use SQL to ensure that all Pluggable Databases (PDBs) are open:
    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.

  7. 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, and change the template file location in the Template data file field.

    When you have completed the entries, click Next.

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

Oracle DBCA generates two files: a database structure file (template_name.dbc), and a database preconfigured image file (template_name.dfb).

Perform the Oracle Grid Infrastructure Installation

You must complete the installation of Oracle Grid Infrastructure before you can proceed with the conversion of the single-instance Oracle AI Database to Oracle Real Application Clusters (Oracle RAC).

To complete the installation of Oracle Grid Infrastructure, refer to the documentation for your operating system.

Note:

The option of Installing Oracle Grid Infrastructure to Manage Generic Applications on the single server can support single server rolling database maintenance.

After Oracle Grid Infrastructure is installed on the server running the single-instance Oracle AI Database, you must register the database to Oracle Clusterware:

  1. As the software owner of the Oracle AI Database home, register the
    single-instance Oracle AI Database to Oracle
    Clusterware.

    $ srvctl add database -dbname db_name -oraclehome Oracle_home 
    -spfile spfile_path_name -dbtype SINGLE
  2. Create and start the database service for your registered database
    using the SRVCTL
    commands.

    $ srvctl add service -db db_name -pdb pdb_name -service service_name [additional_options]
    $ srvctl start service -db db_name -s service_name

Related Topics

Validate the Cluster

After you install Oracle Grid Infrastructure, validate the cluster configuration by using the Configuration Verification Utility (CVU).

Related Topics

Copy the Preconfigured Database Image

After you validate the cluster, copy the preconfigured database image.

When you copy the preconfigured database image, this includes copying the database structure *.dbc file, and the database preconfigured image *.dfb file (the one that you used Oracle DBCA to create earlier in the conversion process) to a temporary location on the node in the cluster from which you plan to run Oracle DBCA.

Install the New Oracle AI Database Software with Oracle RAC

Install the new Oracle AI Database release, selecting Cluster Installation Mode.

  1. Run Oracle Universal Installer to install an Oracle AI Database with Oracle RAC.
  2. Select Cluster Installation Mode on the Specify Hardware Cluster Installation page of Oracle Universal Installer, and select the nodes to include in your Oracle RAC database.
  3. On the Oracle Universal Installer Database Configuration Types page, select the Advanced installation type.

    After installing the Oracle AI Database software, Oracle Universal Installer runs postinstallation configuration tools, such as Net Configuration Assistant (NETCA), Oracle DBCA, and so on.

  4. On the Oracle DBCA Template Selection page, use the template that you copied to a temporary location in the previous section. Use the browse option to select the template location.

    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. After creating the Oracle RAC database, Oracle DBCA displays the Password Management page on which you must change the passwords for database users who have SYSDBA and SYSOPER privileges. When Oracle DBCA exits, the conversion process is complete.

Converting Single Instance on a Cluster to Oracle RAC One Node Using Oracle DBCA

To convert a single-instance Oracle AI Database to Oracle RAC One Node, use this Oracle DBCA procedure.

  1. Change directory to $ORACLE_HOME/bin.
  2. Start Oracle DBCA:

    $ dbca
  3. From the Welcome window, select Oracle RAC One Node database.
  4. Use the Oracle DBCA template that you selected during conversion of the single-instance Oracle AI Database to Oracle RAC to deploy Oracle RAC One Node.

Converting Single Instance on a Cluster to Oracle RAC Using Oracle DBCA

Learn when you can convert a single instance Oracle AI Database to an Oracle Real Application Clusters instance, and find out how to perform the conversion.

Scenarios for Converting Single Instance on a Cluster to Oracle RAC

There are three scenarios where you can use Oracle DBCA to convert an Oracle AI Database single instance on a cluster to an Oracle Real Application Clusters (Oracle RAC) instance.

  • Scenario 1: The Oracle home for the single-instance database was installed on a cluster node, and has Oracle RAC enabled.
  • Scenario 2: The Oracle home for the single-instance database was installed on a cluster node, but the Oracle RAC feature is disabled for this Oracle home.
  • Scenario 3: The Oracle home for the single-instance database was installed only on the local node in a cluster. This configuration happens when you select the Local Installation option on the Oracle Universal Installer Specify Hardware Cluster Installation page during Oracle AI Database installation.

Single-Instance Database on a Cluster Running from an Oracle RAC-Enabled Home

To convert a single-instance database on a cluster node running from an Oracle home that has the Oracle RAC option enabled, complete these procedures.

Setting up the Cluster to Convert a Single-Instance Database on a Cluster

To convert a single-instance database on a cluster node running from an Oracle home that has the Oracle RAC option enabled, you first use Oracle DBCA to set up the cluster.

  1. Use Oracle DBCA to create a preconfigured image of your single-instance database. To perform the conversion manually, shut down the single-instance database.
  2. Add nodes to your cluster. Ensure that all nodes can access the shared storage used by Oracle Clusterware and Oracle RAC.
  3. From the existing Oracle home, extend this home to the new nodes.
  4. From a newly added node, configure the listeners on the additional nodes using NETCA. Choose the same port number and protocol that you used on the existing node. If 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:

After you prepare the cluster, you are ready to convert the Oracle AI Database, either by using an automated conversion with Oracle DBCA, or by performing a manual conversion. Select the procedure that you prefer.

Related Topics

Automated Conversion Procedure Using Oracle DBCA

To complete conversion automatically from a single instance Oracle AI Database to an Oracle Real Application Clusters (Oracle RAC) database, you can us this procedure.

If you used Oracle DBCA to create a preconfigured image of your single-instance database, then perform the following steps to complete the conversion to an Oracle RAC database

  1. Start Oracle DBCA from the initial node. Select the names of the nodes to include as part of your cluster database. On the Template Selection page, select the preconfigured template that you created previously with Oracle DBCA. Enter the database name, and respond to the remaining Oracle DBCA prompts.
  2. Specify the shared storage location for the Oracle AI Database data files.

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

Manual Conversion Procedure

Use this procedure to manually convert a single instance Oracle AI Database to an Oracle Real Application Clusters (Oracle RAC) database.

If you did not use Oracle DBCA to create a preconfigured image of your single-instance database as described in a previous section, then perform the following steps to complete the conversion:

  1. Create the Optimal Flexible Architecture directory structure on each of the nodes that you have added.
  2. Shut down the database instance.
  3. Set the CLUSTER_DATABASE parameter to TRUE, and set the INSTANCE_NUMBER parameter to a unique value for each instance, using the sid.parameter=value syntax.
    SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=SPFILE;
    SQL> ALTER SYSTEM SET INSTANCE_NUMBER=instance_name.instance_number

    Oracle RAC requires about 350 bytes for each buffer for Oracle Cache Fusion. Adjust the size of the System Global Area (SGA) to 350 bytes for each buffer before converting to Oracle RAC. For example, if you have 10,000 buffers, then Oracle RAC requires approximately 350*10,000= 35,00,000 bytes more memory. Therefore, adjust the size of the SGA by changing the DB_CACHE_SIZE and DB_nK_CACHE_SIZE parameters accordingly.

  4. Start the database instance.
  5. Create an undo tablespace for each additional instance using the CREATE UNDO TABLESPACE SQL statement.
  6. Create redo threads that have at least two redo logs for each additional instance. Enable the new redo threads by using an ALTER DATABASE SQL statement. Then, shut down the database instance.
  7. Copy the Oracle Password file to an Oracle ASM disk group.
  8. On the local node, use SQL*Plus to run catclust.sql. This script creates the dictionary views needed for Oracle RAC databases. For example:

    SQL> start ?/rdbms/admin/catclust.sql
  9. Add the configuration for the Oracle RAC or Oracle RAC One Node database and its instance-to-node mapping using SRVCTL.

    1. Add the configuration of an Oracle RAC database.

      $ srvctl add database -dbname db_name -oraclehome Oracle_home -spfile spfile_path_name
      $ srvctl add instance -dbname db_name -instance inst1_name -node node1_name
      $ srvctl add instance -dbname db_name -instance inst2_name -node node2_name
    2. Create a new service for the database.

      $ srvctl add service -dbname db_name -service service_name
    3. Add the configuration of an Oracle RAC One Node database.

      $ srvctl add database -dbname db_name -dbtype RACONENODE -oraclehome Oracle_home -spfile spfile_path_name
  10. Start the Oracle RAC or Oracle RAC One Node database using SRVCTL.

    $ srvctl start database -d db_name

After starting the database with SRVCTL, your conversion process is complete. You can run the following SQL statement to see the status of all the instances in your Oracle RAC database:

SQL> SELECT * FROM v$active_instances;

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

You can create a single-instance database on a cluster running from an Oracle home with the Oracle Real Application Clusters (Oracle RAC) option disabled.

To create an Oracle home on a cluster with Oracle RAC disabled, you can select local and non-cluster on the Node Selection Page of Oracle Universal Installer when installing the Oracle AI Database software. You can also performed a one-node cluster (with Oracle RAC) installation, but later disable the Oracle RAC option.

Perform the following procedures to convert this type of single-instance database to an Oracle RAC or Oracle RAC One Node database:

  1. Use Oracle DBCA to create a preconfigured image of your single-instance database. To perform the conversion manually, shut down the single-instance database.
  2. Change the directory to the lib subdirectory in the rdbms directory under the Oracle home.
  3. Relink the oracle binary by running the following commands:

    export ORACLE_HOME=/u01/app/oracle/product/23.4.0/dbhome_1
    make -f ins_rdbms.mk rac_on
    make -f ins_rdbms.mk ioracle
  4. Add nodes to your cluster. Ensure that all nodes can access the shared storage used by Oracle Clusterware and Oracle RAC.

Related Topics

Converting Single Instance on a Single Server to Oracle RAC One Node Using Oracle DBCA

To convert a single-instance Oracle AI Database on a single server to Oracle RAC One Node, use this Oracle DBCA procedure.

  1. If your single-instance database is running, then stop it.

    $ export ORACLE_SID=<DB SID>
    $ sqlplus "/as sysdba"
    SQL> shutdown immediate
    SQL> exit
  2. If you have a listener running on port 1521, the stop it.

    $ lsnrctl stop listener
  3. If you have the ONS server running, then stop it.

    $ onsctl stop
  4. Perform the Oracle Grid Infrastructure installation by using the procedure described in Oracle Grid Infrastructure Installation and Upgrade Guide for your platform.

    Note:

    The option of installing Oracle Grid Infrastructure to Manage Generic Applications on the single server also supports single server rolling database maintenance.

  5. Make your existing Oracle AI Database home RAC-enabled.

    1. Change the directory to the lib subdirectory in the rdbms directory under the Oracle home.
    2. Relink the oracle binary by running the following commands:

      export ORACLE_HOME=/u01/app/oracle/product/23.4.0/dbhome_1
      make -f ins_rdbms.mk rac_on
      make -f ins_rdbms.mk ioracle
  6. As the software owner of the Oracle AI Database home, register the single-instance Oracle AI Database to Oracle Clusterware.

    $ srvctl add database -dbname db_name -oraclehome Oracle_home -spfile spfile_path_name
    $ srvctl start database -db db_unique_name
  7. Use Oracle DBCA in silent mode to convert to the single instance Oracle AI Database to Oracle RAC One Node database.

    $ dbca -silent -convertToRac -sourceDB db_name
    $ srvctl start database -db db_unique_name
  8. Create and start database service for your registered database using SRVCTL commands.
    $ srvctl add service -db db_name -pdb pdb_name -service service_name -notification true [additional_options]
    $ srvctl start service -db db_name -service service_name

    Note:

    When creating a service, add options as required by your applications. Using Transparent Application Continuity with the service will minimize the impact to the transactions during local rolling database maintenance.

Related Topics