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 regardless of their management style (either administrator or policy managed).

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.

If your Oracle RAC One Node database is administrator managed, then the target node to which you want to relocate the database instance must be part of the Free server pool at the moment you initiate the relocation. If you have a spare target node in the Free server pool, then this node is added to the candidate list for the Oracle RAC One Node database.

Note:

  • 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. This is true for both policy-managed and administrator-managed databases.

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

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

See Also:

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

See Also: