After a restore succeeded, the restored tenant is a standby tenant. You can execute the ACTIVATE statement to change the role of the standby tenant to PRIMARY.
Background
Physical restore is associated with Physical Standby Database. A physically restored tenant serves as a standby tenant. You can change its role to PRIMARY based on your business needs.
Prerequisites
The restore succeeded. For more information about how to view the restore result, see Query the restore result.
Change the role of a standby tenant to PRIMARY from the sys tenant
Log on to the
systenant of the cluster as therootuser.Execute the following statement to change the role of the standby tenant.
obclient [(none)]> ALTER SYSTEM ACTIVATE STANDBY TENANT tenant_name;Note
You can use this statement to change the role of only one tenant at a time. To change the roles of multiple tenants, execute this statement repeatedly.
Here is an example:
obclient [(none)]> ALTER SYSTEM ACTIVATE STANDBY TENANT mysql;For more information about the parameters in the statement, see Parameters related to physical restore.
Change the role of a standby tenant to PRIMARY from the standby tenant
Log on to the database as an administrator of the standby tenant.
Note
The administrator user is
rootfor a tenant in MySQL mode andSYSfor a tenant in Oracle mode.Execute the following statement to change the role of the standby tenant.
obclient [(none)]> ALTER SYSTEM ACTIVATE STANDBY;