This article was written by Skant Gupta and Joel Perez in Oracle OTN.

At the last part of this article we performed Switchover, Failover & Reinstate Operations on Oracle Data Guard using the DBCS Console.

You can read it here:

Oracle Cloud (DBaaS): Switchover, Failover & Reinstate Operations on Oracle Data Guard using DBCS Console

Now in this this article we will show the necessary steps to perform Switchover, Failover & Reinstate Operations using the dbaascli Utility

Performing a Switchover Operation

A switchover operation enables the primary database to switch roles with its standby database. There is no data loss during a switchover. After a switchover, each database continues to participate in the Oracle Data Guard configuration in its new role. A switchover is typically used to reduce primary database downtime during planned outages, such as operating system or hardware upgrades, or rolling upgrades of the Oracle database software and patch sets.

Steps to Perform a Switchover Operation using the dbaascli utility

You can use the dataguard switchover subcommand of the dbaascli utility to perform a switchover to the standby database in your Oracle Data Guard configuration.

To perform a switchover by using the dataguard switchover subcommand:

  1. Connect to the compute node in the Oracle Data Guard configuration that will host the new primary database as the opc user.
Using username “opc”.

Authenticating with public key “rsa-key-20170425”

Passphrase for key “rsa-key-20170425”:

[opc@DATAGUARD-dg01 ~]$

2. Start a root-user command shell and then switch to the oracle user.

[opc@DATAGUARD-dg01 ~]$ sudo su – oracle

[oracle@DATAGUARD-dg01 ~]$

3. Initiate the switchover to the standby database

[oracle@DATAGUARD-dg01 ~]$ dbaascli dataguard switchover

DBAAS CLI version 1.0.0

Executing command dataguard switchover

Performing switchover NOW, please wait…

New primary database “ORCL_02” is opening…

Operation requires startup of instance “ORCL” on database “ORCL_01”

Starting instance “ORCL”…

ORACLE instance started.

Database mounted.

Switchover succeeded, new primary is “ORCL_02”

SUCCESS : Switchover to Standby operation completed successfully

[oracle@DATAGUARD-dg01 ~]

4. Restart the ORDS server

[root@DATAGUARD-dg01 ~]# /etc/init.d/ords restart

INFO: Stopping Oracle REST Data Services…

INFO: Oracle REST Data Services stopped

INFO: Starting Oracle REST Data Services…

INFO: Oracle REST Data Services bound to ports 8080,8181 854

INFO: Oracle REST Data Services started with PID 854

[root@DATAGUARD-dg01 ~]#

5. Check the status of standby database

[oracle@DATAGUARD-dg01 ~]$ dbaascli dataguard status

DBAAS CLI version 1.0.0

Executing command dataguard status

SUCCESS : Dataguard is up and running

DETAILS:

Configuration – fsc

  Protection Mode: MaxPerformance

  Databases:

    ORCL_02 – Primary database

    ORCL_01 – Physical standby database

  Properties:

    FastStartFailoverThreshold      = ’30’

    OperationTimeout                = ‘120’

    FastStartFailoverLagLimit       = ’30’

    CommunicationTimeout            = ‘180’

    ObserverReconnect               = ‘0’

    FastStartFailoverAutoReinstate  = ‘TRUE’

    FastStartFailoverPmyShutdown    = ‘TRUE’

    BystandersFollowRoleChange      = ‘ALL’

    ObserverOverride                = ‘FALSE’

    ExternalDestination1            = ”

    ExternalDestination2            = ”

    PrimaryLostWriteAction          = ‘CONTINUE’

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

[oracle@DATAGUARD-dg01 ~]$

If you want to read rest to the article, go across this link : Switchover,Failover and Reinstate in Database Cloud with dbaascli

Comments

  1. Pingback: Oracle Cloud (DBaaS): Using dbaascli Utility for Reinstating Operations on Oracle Data Guard - Oracle Blog - Oracle - Toad World

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.