Migrating the role of primary site to the secondary site

After configuring the replication objects within VCS, you can use VCS commands to migrate the role of the cluster on the primary site to the remote cluster. In the procedure below, VCS takes the replicated database service group, database_grp, offline on the primary site and brings it online on the secondary site; the secondary site now assumes the role of the primary site.

Note:

The hagrp -switch command cannot migrate a parallel group within a cluster or between clusters in a global cluster environment.

To migrate the role of primary site to the remote site

  1. From the primary site, use the following command to take the Oracle service group offline on all nodes.
    # hagrp -offline database_grp -any

    Wait for VCS to take all Oracle service groups offline on the primary site.

  2. Verify that the RLINK between the primary and secondary is up to date. Use the vxrlink -g command with the status option and specify the RLINK for the primary cluster. You can use the command from any node on the primary cluster.

    For example:

    # 

    Where rlk_clus1_priv_rac1_rvg is the RLINK.

  3. On the secondary site, which is now the new primary site, bring the Oracle service group online on all nodes:
    # hagrp -online database_grp -any

After migrating the role of the primary site to the secondary site, you can use VCS commands to migrate the role of the cluster on the new primary site to the original primary site. In the procedure below, VCS takes the replicated database service group, database_grp, offline on the new primary (former secondary) site and brings it online on the original primary site; the original primary site now resumes the role of the primary site.

Note:

The hagrp -switch command cannot migrate a parallel group within a cluster or between clusters in a global cluster environment.

To migrate the role of new primary site back to the original primary site

  1. Make sure that all CRS resources are online, and switch back the group database_grp to the original primary site.

    Issue the following command on the remote site:

    # hagrp -offline database_grp -any
  2. Verify that the RLINK between the primary and secondary is up to date. Use the vxrlink -g command with the status option and specify the RLINK for the primary cluster. You can use the command from any node on the current primary cluster.

    For example:

    # vxrlink -g data_disk_group status rlk_clus1_priv_rac1_rvg
    					

    Where rlk_clus1_priv_rac1_rvg is the RLINK.

  3. Make sure that database_grp is offline on the new primary site. Then, execute the following command on the original primary site to bring the database_grp online:
    # hagrp -online database_grp -any