You can relocate an Oracle Database 19c Standard Edition 2/Enterprise Edition to another node in a Failover HA setup. The relocation might be needed in case of planned maintenance such as updating operating system, or applying Oracle Release Updates in a rolling fashion.
Prerequisites
The database can be relocated only to one of the nodes on which it can run. You can check its current configured node list by using the srvctl config database -db <db_name>
command. For example:
[oracle@rac1 ~]$ srvctl config database -db orcl
...
Configured nodes: rac1,rac2
...
To change the list of configured nodes, refer to the link below corresponding to the database edition:
- Enabling Failover HA for a new Enterprise Edition database (non-RAC)
- Enabling Failover HA for a new Standard Edition database (non-RAC)
To determine the node where the database is running now, use the srvctl status database -db <db_name>
command. For example:
[oracle@rac1 ~]$ srvctl status database -db orcl
Instance orcl is running on node rac1
Relocating a database to another node
To relocate a running database to a different node, use the command below:
$ srvctl relocate database -db <db_name> -node <target_node>
For example, to relocate the database orcl to the node rac2:
[oracle@rac1 ~]$ srvctl relocate database -db orcl -node rac2
Note: the relocation is performed by stopping the database on the current node and starting it on the target node. There is a time period when the database is not available.
Note: manually stopping the database, e.g. via shutdown immediate
, will not trigger a database relocation. Use the command above for that.