This topic describes how to disconnect a standby cluster that meets the conditions for disconnection.
Prerequisites
Preparations are made for the disconnection. For more information, see Preparations for disconnection.
Procedure
Log on to the
systenant of the standby cluster to be disconnected with therootaccount.Execute the
DISCONNECTstatement on the standby cluster.SQL syntax:
obclient> ALTER SYSTEM DISCONNECT STANDBY CLUSTER standby_cluster_name CLUSTER_ID standby_cluster_id SET CLUSTER_NAME standby_new_cluster_name OBCONFIG_URL config_url;Parameters:
standby_cluster_name: the original name of the standby cluster to be disconnected. You can obtain the name by querying theV$OB_CLUSTERview.standby_cluster_id: the ID of the standby cluster to be disconnected. You can obtain the cluster ID by querying theV$OB_CLUSTERview.standby_new_cluster_name: the new name of the standby cluster after it is disconnected.config_url: the new value ofOBCONFIG_URLfor the standby cluster after it is disconnected.OBCONFIG_URLspecifies the URL of the OBConfig service.For more information about
OBCONFIG_URL, see obconfig_url.
The standby cluster becomes independent and remains in the standby role. The cluster is renamed and disconnected from the original primary cluster.
Query the
V$OB_CLUSTERview of the standby cluster. The name of the cluster is refreshed.Remove the disconnected standby cluster from the clusters list of the original primary cluster.
You can execute the REMOVE statement on the original primary cluster to remove the disconnected standby cluster from the clusters list of the original primary cluster.
SQL syntax:
obclient> ALTER SYSTEM REMOVE CLUSTER cluster_name CLUSTER_ID standby_cluster_id;Parameters:
cluster_name: the original name of the standby cluster before it is disconnected.standby_cluster_id: the ID of the standby cluster.
For more information about the usage and limitations of the statement to remove a cluster, see Remove a standby cluster.
Execute a failover statement on the disconnected standby cluster to switch it to the primary role.
SQL syntax:
obclient> ALTER SYSTEM ACTIVATE PHYSICAL STANDBY CLUSTER;For more information about the usage and limitations of the failover statement, see Perform a failover in a command-line tool.
Optional. Connect standby clusters to the new primary cluster.
After the disconnected cluster is switched to the primary role, you can connect standby clusters to it. For more information about how to connect standby clusters, see Deploy a standby cluster in OCP.