4 Administering Oracle RAC One Node

Learn how to administer Oracle Real Application Clusters One Node (Oracle RAC One Node).

Oracle Real Application Clusters One Node (Oracle RAC One Node) is a single instance of an Oracle Real Application Clusters (Oracle RAC) database that runs on one node in a cluster. This option adds to the flexibility that Oracle offers for database consolidation. You can consolidate many databases into one cluster with minimal overhead while also providing the high availability benefits of failover protection, online rolling patch application, and rolling upgrades for the operating system and Oracle Clusterware.

Creating an Oracle RAC One Node Database

You can create Oracle RAC One Node databases by using Fleet Patching and Provisioning or the Oracle Database Configuration Assistant (Oracle DBCA), as with any other Oracle database (manually created scripts are also a valid alternative).

You can create an Oracle RAC One Node database using Fleet Patching and Provisioning and the rhpctl add database command with the -dbtype RACONENODE parameter. You can also include an Oracle RAC One Node database using the rhpctl add workingcopy command.

Oracle RAC One Node databases may also be the result of a conversion from either a single-instance Oracle database or an Oracle RAC database. Typically, Oracle-provided tools register the Oracle RAC One Node database with Oracle Clusterware. Depending on your configuration, automatic registration of an Oracle RAC One Node database with Oracle Clusterware may not have happened. If this is the case, then follow the steps in this section to register the Oracle RAC One Node database with Oracle Clusterware.

Note:

Oracle recommends that you manage Oracle RAC One Node databases with Server Control Utility (SRVCTL). You can only perform certain operations (such as Online Database Relocation) using SRVCTL.

If your Oracle RAC One Node database did not register automatically with Oracle Clusterware, then use the srvctl add database command to add an Oracle RAC One Node database to your cluster. For example:

$ srvctl add database -dbtype  RACONENODE [-server server_list]
  [-instance instance_name] [-timeout timeout]

Use the -server option and the -instance option when adding an administrator-managed Oracle RAC One Node database.

Note:

The policy-managed database deployment option is desupported in Oracle Database 23ai.

For Oracle RAC One Node databases, you must configure at least one dynamic database service (in addition to and opposed to the default database service). When using an Oracle RAC One Node database, service registration is performed as with any other Oracle RAC database.

Note:

When adding an Oracle RAC One Node database, you can optionally supply an instance prefix with the -instance instance_name parameter of the srvctl add database command. The name of the instance will then be prefix_1. If you do not specify an instance prefix, then the first 12 characters of the unique name of the database becomes the prefix. The instance name changes to prefix_2 during an online database relocation and reverts back to prefix_1 during a subsequent online database relocation. The same instance name is used on failover.

Converting Databases

Using SRVCTL, you can convert an Oracle Real Application Clusters (Oracle RAC) database with one instance to an Oracle RAC One Node database, or back to an Oracle RAC database instance.

Converting a Database from Oracle RAC to Oracle RAC One Node

Use SRVCTL to convert an Oracle RAC database to an Oracle RAC One Node database.

Before converting an Oracle RAC database to an Oracle RAC One Node database, you must first ensure that the Oracle RAC database has only one instance. If your Oracle RAC database is administrator managed and has more than one instance, then you must remove all instances except one using the srvctl remove instance command.

If the Oracle RAC database is administrator managed, then you must change the configuration of all services to set the preferred instance to the instance that you want to keep as an Oracle RAC One Node database after conversion. If any service had a PRECONNECT TAF policy, then its TAF policy must be updated to BASIC or NONE before starting the conversion process. These services must no longer have any available instance.

You can convert an Oracle RAC database with one instance to an Oracle RAC One Node database using the srvctl convert database command, as follows:

$ srvctl convert database -db db_unique_name -dbtype RACONENODE
  [-instance instance_name -timeout timeout]
  -w timeout]

Note:

An Oracle RAC database that you want to convert to Oracle RAC One Node must either use Oracle Managed Files (to enable automatic thread allocation) or have at least two redo threads.

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 using SRVCTL.

Note:

The policy-managed database deployment option is desupported in Oracle Database 23ai.

Log in as the Oracle RAC One Node database owner and enter 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 Oracle RAC One Node database to an Oracle RAC database configures all database services so that the instance from the Oracle RAC One Node database is the preferred instance in the converted Oracle RAC database for that service. After you convert the database, you can add instances to your database by using the srvctl add instance command.

Related Topics

Online Database Relocation

You can relocate an Oracle RAC One Node database to another node while still maintaining service availability using the online database relocation feature.

Only during a planned online database relocation is a second instance of an Oracle RAC One Node database created, so that any database sessions can continue while the database is relocated to a new node. You can only use online database relocation with Oracle RAC One Node databases but you cannot use online database relocation with Oracle RAC databases.

You can use the srvctl relocate database command configure the amount of time after the relocated database starts and services are migrated, before the former instance of the database stops. This configured amount of time is not an upper bound on the amount of time taken by the entire operation, but only controls how long the relocated database waits for connections to migrate from the former instance to the new instance, before stopping the former instance.

Online database relocation occurs, as follows:

  1. Start a new database instance in a different location.

  2. Move all the services to the relocated instance.

  3. Wait for all the connections to migrate to the relocated instance.

  4. Shut down the former database instance, forcing any remaining connections to move to the relocated instance.

The online relocation timeout is the amount of time you configure to complete step 3.

Before you initiate the online relocation of a database instance, perform the following tasks:

  • When you relocate a database instance to a target node that is not currently in the candidate server list for the database, you must copy the password file, if configured, to the target node, unless you use shared password files stored in Oracle ASM.

  • When you use password file-based authentication for remote management of Oracle RAC One Node databases without any shared password file, you must have two password files on each node where the database can run: one named SID_prefix_1 and the other named SID_prefix_2. You must recopy both of these files to all candidate nodes every time you update the password file.

    Oracle recommends using Oracle Clusterware to start and stop the database, and defining users in the data dictionary for other management.

  • If your operating system is Microsoft Windows, then before you relocate a database instance, you must ensure that the database service user is added to the wallet. Run crsctl query wallet -type OSUSER -all to check whether the database service user is in the wallet. If not, then run crsctl add wallet -type OSUSER -user user_name -passwd to add the database service user to the wallet.

Use the srvctl relocate database command to initiate relocation of an Oracle RAC One Node database. For example:

$ srvctl relocate database -d rac1 -n node7