Wednesday, May 26, 2021

Convert a Physical Standby to a Snapshot Standby using DGMGRL

 

Convert a Physical Standby to a Snapshot Standby using DGMGRL


[oracle@ip-10-0-1-12 ~]$ dgmgrl

DGMGRL for Linux: Release 12.2.0.1.0 - Production on Wed May 26 11:07:46 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys/@india

Password:

Connected to "india"

Connected as SYSDBA.

DGMGRL>

DGMGRL>

DGMGRL>

DGMGRL> show configuration;

Configuration - india

  Protection Mode: MaxPerformance

  Members:

  india      - Primary database

    india_stby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS   (status updated 43 seconds ago)

DGMGRL>

DGMGRL>

DGMGRL> validate database india;

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Flashback Database Status:

    india:  Off

  Managed by Clusterware:

    india:  NO

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

DGMGRL>

DGMGRL> validate database india_stby;

  Database Role:     Physical standby database

  Primary Database:  india

  Ready for Switchover:  Yes

  Ready for Failover:    Yes (Primary Running)

  Flashback Database Status:

    india     :  Off

    india_stby:  On

  Managed by Clusterware:

    india     :  NO

    india_stby:  NO

    Warning: Ensure primary database's StaticConnectIdentifier property

    is configured properly so that the primary database can be restarted

    by DGMGRL after switchover

  Current Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status

              (india)                 (india_stby)

    1         3                       3                       Insufficient SRLs

  Future Log File Groups Configuration:

    Thread #  Online Redo Log Groups  Standby Redo Log Groups Status

              (india_stby)            (india)

    1         3                       2                       Insufficient SRLs

DGMGRL>

DGMGRL>

DGMGRL>

DGMGRL> convert database india_stby to snapshot standby;

Converting database "india_stby" to a Snapshot Standby database, please wait...

Database "india_stby" converted successfully

DGMGRL>


On Standby database 

====================


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


NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

INDIA     READ ONLY WITH APPLY PHYSICAL STANDBY


SQL> /

select name ,open_mode,database_role from v$database

*

ERROR at line 1:

ORA-03135: connection lost contact

Process ID: 5938

Session ID: 272 Serial number: 59433


SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[oracle@ip-10-0-1-37 ~]$

[oracle@ip-10-0-1-37 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on Wed May 26 11:11:02 2021

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

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

NAME      OPEN_MODE            DATABASE_ROLE

--------- -------------------- ----------------

INDIA     READ WRITE           SNAPSHOT STANDBY


SQL>

SQL>

SQL>

SQL> create table hr.abc_snap as select * from hr.abc;

Table created.

SQL>

SQL> select * from hr.abc_snap;

        ID NAME

---------- --------------------------------------------------

         2 From standby after primary

         1 A

         3 from primary after convert


SQL>





No comments:

Post a Comment