Saturday, July 4, 2020

DATAGUARD--- BROKER,CONFIGURATION,SWITCHOVER,FAIL-OVER,REINITIATED,FAST-START -FAILOVER,ESTING

DATAGUARD--- BROKER




Register both stand and prime databases.











[oracle@ranesh admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = prime)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/db_1)
      (SID_NAME = prime)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = stand)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/db_1)
      (SID_NAME = stand)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = prime_DGMGRL)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/db_1)
      (SID_NAME = prime)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = stand_DGMGRL)
      (ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/db_1)
      (SID_NAME = stand)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ranesh.prime.com)(PORT = 1521))
  )

ADR_BASE_LISTENER = /u01/app/oracle


------------RELOAD THE LISTENER

[oracle@ranesh dbs]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 04-JUL-2020 22:54:14

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ranesh.prime.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                04-JUL-2020 20:32:12
Uptime                    0 days 2 hr. 22 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ranesh/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ranesh.prime.com)(PORT=1521)))
Services Summary...
Service "prime" has 2 instance(s).
  Instance "prime", status UNKNOWN, has 1 handler(s) for this service...

  Instance "prime", status READY, has 1 handler(s) for this service...
Service "primeXDB" has 1 instance(s).
  Instance "prime", status READY, has 1 handler(s) for this service...
Service "prime_DGB" has 1 instance(s).
  Instance "prime", status READY, has 1 handler(s) for this service...
Service "prime_DGMGRL" has 1 instance(s).
  Instance "prime", status UNKNOWN, has 1 handler(s) for this service...
Service "stand" has 1 instance(s).
  Instance "stand", status UNKNOWN, has 1 handler(s) for this service...
Service "stand_DGMGRL" has 1 instance(s).
  Instance "stand", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully


----Change the parameter both side

PRIMARY

ALTER SYSTEM SET dg_broker_start=true scope=spfile;

ALTER SYSTEM SET local_listener='(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ranesh.stand.com)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = prime)))';



STANDBY

ALTER SYSTEM SET dg_broker_start=true scope=spfile;

ALTER SYSTEM SET local_listener='(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ranesh.stand.com)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = stand)))';

---LOGIN TO PRIMARY THROUGH DGMGRL

[oracle@ranesh ~]$ export ORACLE_SID=prime
[oracle@ranesh ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@prime
Connected as SYSDBA.

DGMGRL> connect sys/oracle@prime
Connected as SYSDBA.
DGMGRL> show configuration;
ORA-16532: Oracle Data Guard broker configuration does not exist
Configuration details cannot be determined by DGMGRL

Configure Dataguard Broker for primary

DGMGRL> create configuration ‘hari’ as primary database is ‘prime’ connect identifier is prime;
Error: ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added Failed.
Fix for this issue
SQL> alter system set LOG_ARCHIVE_DEST_2= ' '; (both Side)
System altered.

DGMGRL> create configuration 'ranesh' as primary database is 'prime' connect identifier is prime;



DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> Add database 'stand' as connect identifier is 'stand' maintained as physical;
Database "stand" added
DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> show database verbose 'stand';

Database - stand

  Role:               PHYSICAL STANDBY
  Intended State:     OFFLINE
  Transport Lag:      (unknown)
  Apply Lag:          (unknown)
  Average Apply Rate: (unknown)
  Active Apply Rate:  (unknown)
  Maximum Apply Rate: (unknown)
  Real Time Query:    OFF
  Instance(s):
    stand

  Properties:
    DGConnectIdentifier             = 'stand'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '5'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '/u01/app/oracle/oradata/prime, /u01/app/oracle/oradata/stand'
    LogFileNameConvert              = '/u01/app/oracle/oradata/prime, /u01/app/oracle/oradata/stand'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ranesh.stand.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stand_DGMGRL)(INSTANCE_NAME=stand)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.dbf'
    TopWaitEvents                   = '(monitor)'

Database Status:
DISABLED

DGMGRL> show database verbose 'prime';

Database - prime

  Role:               PRIMARY
  Intended State:     TRANSPORT-ON
  Instance(s):
    prime

  Properties:
    DGConnectIdentifier             = 'prime'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '/u01/app/oracle/oradata/prime/, /u01/app/oracle/oradata/stand/'
    LogFileNameConvert              = '/u01/app/oracle/oradata/prime/, /u01/app/oracle/oradata/stand/'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ranesh.prime.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=prime_DGMGRL)(INSTANCE_NAME=prime)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.dbf'
    TopWaitEvents                   = '(monitor)'

Database Status:
DISABLED

DGMGRL> enable configuration
Enabled.
DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 11 seconds ago)

DGMGRL> enable database 'stand';
Enabled.
DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 3 seconds ago)

DGMGRL> show database 'stand';

Database - stand

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 1 second ago)
  Apply Lag:          0 seconds (computed 1 second ago)
  Average Apply Rate: 42.00 KByte/s
  Real Time Query:    OFF
  Instance(s):
    stand

Database Status:
SUCCESS

DGMGRL> SHOW DATABASE VERBOSE 'prime';

Database - prime

  Role:               PRIMARY
  Intended State:     TRANSPORT-ON
  Instance(s):
    prime

  Properties:
    DGConnectIdentifier             = 'prime'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '/u01/app/oracle/oradata/prime/, /u01/app/oracle/oradata/stand/'
    LogFileNameConvert              = '/u01/app/oracle/oradata/prime/, /u01/app/oracle/oradata/stand/'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ranesh.prime.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=prime_DGMGRL)(INSTANCE_NAME=prime)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.dbf'
    TopWaitEvents                   = '(monitor)'

Database Status:
SUCCESS

DGMGRL> VALIDATE DATABASE 'prime';

  Database Role:    Primary database

  Ready for Switchover:  Yes

DGMGRL> VALIDATE DATABASE 'stand';

  Database Role:     Physical standby database
  Primary Database:  prime

  Ready for Switchover:  Yes
  Ready for Failover:    Yes (Primary Running)

  Flashback Database Status:
    prime:  On
    stand:  Off

  Current Log File Groups Configuration:
    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status     
              (prime)                 (stand)                             
    1         3                       2                       Insufficient SRLs

  Future Log File Groups Configuration:
    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status     
              (stand)                 (prime)                             
    1         3                       2                       Insufficient SRLs





SWITCH OVER USING DGMGRL





DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 27 seconds ago)

DGMGRL> switchover to 'stand';
Performing switchover NOW, please wait...
Operation requires a connection to instance "stand" on database "stand"
Connecting to instance "stand"...
Connected as SYSDBA.
New primary database "stand" is opening...
Operation requires start up of instance "prime" on database "prime"
Starting instance "prime"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "stand"

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  stand - Primary database
    prime - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 45 seconds ago)


SQL> select name,open_mode,database_role,protection_level from v$database;

NAME   OPEN_MODE        DATABASE_ROLE PROTECTION_LEVEL
--------- -------------------- ---------------- --------------------
PRIME   READ ONLY        PHYSICAL STANDBY MAXIMUM PERFORMANCE




FAIL -OVER USING DGMGRL

[oracle@ranesh ~]$ export ORACLE_SID=prime----primary sid name

[oracle@ranesh ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@prime
Connected as SYSDBA.
DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  stand - Primary database
    prime - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 3 seconds ago)


DGMGRL> FAILOVER TO 'prime';
Performing failover NOW, please wait...
Failover succeeded, new primary is "prime"


DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 32 seconds ago)

SQL> select name,open_mode,database_role,protection_level from v$database;

NAME   OPEN_MODE        DATABASE_ROLE PROTECTION_LEVEL
--------- -------------------- ---------------- --------------------
PRIME   READ WRITE        PRIMARY MAXIMUM PERFORMANCE


Re-instate database 

---Restart the Old Primary Database

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1912602624 bytes
Fixed Size     2925792 bytes
Variable Size 1191185184 bytes
Database Buffers   704643072 bytes
Redo Buffers    13848576 bytes
Database mounted.

[oracle@ranesh ~]$ dgmgrl 
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@prime
Connected as SYSDBA.
DGMGRL> REINSTATE DATABASE 'stand';
Reinstating database "stand", please wait...
Operation requires shut down of instance "stand" on database "stand"
Shutting down instance "stand"...
ORACLE instance shut down.
Operation requires start up of instance "stand" on database "stand"
Starting instance "stand"...
ORACLE instance started.
Database mounted.
Continuing to reinstate database "stand" ...
Reinstatement of database "stand" succeeded

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 8 seconds ago)


DGMGRL> show database 'stand';

Database - stand

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
  Apply Lag:          0 seconds (computed 0 seconds ago)
  Average Apply Rate: 13.00 KByte/s
  Real Time Query:    ON
  Instance(s):
    stand

Database Status:
SUCCESS

DGMGRL> show database 'prime';

Database - prime

  Role:               PRIMARY
  Intended State:     TRANSPORT-ON
  Instance(s):
    prime

Database Status:
SUCCESS

Converting a Physical Standby to a Snapshot Standby using DGMGRL Utility

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 48 seconds ago)

primary side

SQL> select name,open_mode,database_role,protection_level from v$database;

NAME   OPEN_MODE        DATABASE_ROLE PROTECTION_LEVEL
--------- -------------------- ---------------- --------------------
PRIME   READ WRITE        PRIMARY MAXIMUM PERFORMANCE

standby side

select open_mode,instance_name,database_role from v$database,v$instance;

OPEN_MODE      INSTANCE_NAME    DATABASE_ROLE
-------------------- ---------------- ----------------
READ ONLY WITH APPLY stand       PHYSICAL STANDBY


DGMGRL> convert database 'stand' to snapshot standby;                            
Converting database "stand" to a Snapshot Standby database, please wait...
Database "stand" converted successfully

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Snapshot standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 2 seconds ago)

standby side

SQL> select open_mode,instance_name,database_role from v$database,v$instance;

OPEN_MODE      INSTANCE_NAME    DATABASE_ROLE
-------------------- ---------------- ----------------
READ WRITE      stand       SNAPSHOT STANDBY

DGMGRL> convert database 'stand' to Physical standby;
Converting database "stand" to a Physical Standby database, please wait...
Operation requires shut down of instance "stand" on database "stand"
Shutting down instance "stand"...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires start up of instance "stand" on database "stand"
Starting instance "stand"...
ORACLE instance started.
Database mounted.
Continuing to convert database "stand" ...
Database "stand" converted successfully

SQL> select open_mode,instance_name,database_role from v$database,v$instance;

OPEN_MODE      INSTANCE_NAME    DATABASE_ROLE
-------------------- ---------------- ----------------
READ ONLY      stand       PHYSICAL STANDBY

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 21 seconds ago)


Fast start failover;


---Enable flashback on both primary and standby


SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

---PRIMARY 

SQL> select name,open_mode,database_role,protection_level from v$database;

NAME   OPEN_MODE        DATABASE_ROLE PROTECTION_LEVEL
--------- -------------------- ---------------- --------------------
PRIME   READ WRITE        PRIMARY MAXIMUM PERFORMANCE


----STANDBY


SQL> select name,open_mode,database_role,protection_level from v$database;

NAME   OPEN_MODE        DATABASE_ROLE PROTECTION_LEVEL
--------- -------------------- ---------------- --------------------
PRIME   READ ONLY WITH APPLY PHYSICAL STANDBY MAXIMUM PERFORMANCE

DGMGRL> SHOW CONFIGURATION;

Configuration - ranesh

  Protection Mode: MaxPerformance
  Members:
  prime - Primary database
    stand - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 41 seconds ago)

DGMGRL> EDIT DATABASE 'prime' SET PROPERTY 'LogXptMode'='SYNC';
Property “LogXptMode” updated

DGMGRL> EDIT DATABASE 'stand' SET PROPERTY 'LogXptMode'='SYNC';
Property "LogXptMode" updated


DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Succeeded.


DGMGRL> show configuration verbose;

Configuration - ranesh

  Protection Mode: MaxAvailability
  Members:
  prime - Primary database
    stand - Physical standby database 

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    TraceLevel                      = 'USER'
    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

Open in Another Terminal in primary side

[oracle@ranesh ~]$ export ORACLE_SID=Prime
[oracle@ranesh ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@prime
Connected as SYSDBA.
DGMGRL> enable fast_start failover;
Enabled.
DGMGRL> start observer;
Observer started---------it will hang

check the status in another terminal


DGMGRL> show fast_start failover

Fast-Start Failover: ENABLED

  Threshold:          30 seconds
  Target:             stand
  Observer:           ranesh.prime.com
  Lag Limit:          30 seconds (not in use)
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: (none)
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxAvailability
  Members:
  prime - Primary database
    stand - (*) Physical standby database 

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS   (status updated 4 seconds ago)




TESTING


[oracle@ranesh ~]$ export ORACLE_SID=Prime
[oracle@ranesh ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/oracle@prime
Connected as SYSDBA.
DGMGRL> enable fast_start failover;
Enabled.
DGMGRL> start observer;
Observer started

Kill the SMON process on primary side

[oracle@ranesh ~]$ ps -ef|grep smon
oracle   15424     1  0 21:40 ?        00:00:00 ora_smon_prime
oracle   16526 16432  0 22:36 pts/2    00:00:00 grep smon
[oracle@ranesh ~]$ kill -9 15424

observer start the failover

DGMGRL> start observer;
Observer started
23:02:29.20 Thursday, June 07, 2020
Initiating Fast-Start Failover to database “stand”…
Performing failover NOW, please wait…
Failover succeeded, new primary is “stand”
23:02:49.20 Thursday, June 07, 2020

Automatically Initiating the reinstate command in observer session(just mount the old primary database)

23:03:02.20 Thursday, June 07, 2020
Initiating reinstatement for database “prime”…
Reinstating database “prime”, please wait…
Reinstatement of database “prime” succeeded
22:03:13.82 Thursday, June 07, 2020

DGMGRL> show configuration

Configuration - ranesh

  Protection Mode: MaxAvailability
  Members:
  prime - Primary database
    stand - (*) Physical standby database 

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS   (status updated 4 seconds ago)




No comments:

Table import and export.

Create Data Pump Directory. The first step in Oracle Data Pump is to create an OS level directory which will be used by Oracle for perform...