This post explains how to seamlessly convert a Physical Standby database into a Snapshot Standby — and later revert it back to a Physical Standby — using DGMGRL, enabling you to fully leverage the flexibility and capabilities of Oracle Data Guard.
When a snapshot standby is switched back to a physical standby, any changes made locally during its read-write phase are discarded. The redo data accumulated from the primary database is then applied, restoring synchronization between the two databases.Because redo data isn’t applied in real time and local transactions can occur independently, the snapshot standby gradually drifts out of sync with the primary. However, this doesn’t affect data protection — the standby can be reconverted to a physical standby at any time, at which point all pending redo is applied to bring it fully up to date.
Snapshot standby databases deliver the same disaster recovery and data protection capabilities as physical standbys, with the added advantage of supporting temporary read-write operations. They are especially useful for testing, patch validation, or reporting scenarios where a writable clone of the production environment is needed.
The snapshot standby feature makes it possible to perform read-write operations on a standby database. To set up a snapshot standby, you first create a physical standby and then convert it into a snapshot standby.
System Overview
The environment consists of one primary and two physical standby databases configured under Oracle Data Guard. The details are as follows:Server:
server-graz — Database: GRAZ (Primary) Server:
server-wien — Database: WIEN (Physical Standby) Server:
server-tirol — Database: TIROL (Physical Standby → to be converted to Snapshot Standby)
GMGRL> show configuration;
Configuration - stby
Protection Mode: MaxPerformance
Members:
GRAZ - Primary database
WIEN - Physical standby database
TIROL - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 30 seconds ago)
Manually Converting a Physical Standby to a Snapshot Standby
The following steps outline the manual process for converting a physical standby database into a snapshot standby:
-
Stop Redo Apply if it is currently active.
-
Ensure the database is mounted but not open.
-
Verify that a Fast Recovery Area (FRA) is configured. (Flashback Database does not need to be explicitly enabled.)
-
Execute the conversion command:
-
Open the snapshot standby in read/write mode:
Conversion with DGMGRL Utility
Execute the commands on primary database:
[oracle@server-tirol admin]$ dgmgrl sys/*********
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Sat Oct 25 18:33:34 2025
Version 19.28.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "TIROL"
Connected as SYSDBA.
DGMGRL> show configuration;
Configuration - stby
Protection Mode: MaxPerformance
Members:
GRAZ - Primary database
WIEN - Physical standby database
TIROL - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 59 seconds ago)
DGMGRL> convert database 'TIROL' to snapshot standby;
Converting database "TIROL" to a Snapshot Standby database, please wait...
Database "TIROL" converted successfully
DGMGRL> show configuration;
Configuration - stby
Protection Mode: MaxPerformance
Members:
GRAZ - Primary database
WIEN - Physical standby database
TIROL - Snapshot standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 47 seconds ago)
DGMGRL> Verifying the Snapshot Standby Conversion[oracle@server-tirol ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sat Oct 25 18:35:45 2025
Version 19.28.0.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.28.0.0.0
SQL> select status,instance_name,database_role,open_mode from v$database,v$instance;
STATUS INSTANCE_NAME DATABASE_ROLE OPEN_MODE
------------ ---------------- ---------------- --------------------
OPEN TIROL SNAPSHOT STANDBY READ WRITEReverting a Snapshot Standby to a Physical Standby
The ability to revert a snapshot standby back to a physical standby is made possible by a restore point that Oracle automatically creates during the initial conversion. This restore point allows the database to be seamlessly rolled back to its previous physical standby state. However, this mechanism does not apply to logical standby databases, which we’ll cover in a separate post.
SQL> set pages 400 lines 200
SQL> col time form a20
SQL> col name form a50
SQL> select name,scn,to_char(time,'dd.mm.yyyy hh24:mi:ss') as time from v$restore_point
NAME SCN TIME
-------------------------------------------------- ---------- --------------------
SNAPSHOT_STANDBY_REQUIRED_10/25/2025 18:33:51 1335709 25.10.2025 18:33:51Execute the commands on primary database:[oracle@server-graz ~]$ dgmgrl sys/Welcome1
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Sat Oct 25 19:09:27 2025
Version 19.28.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "GRAZ"
Connected as SYSDBA.
DGMGRL> show configuration;
Configuration - stby
Protection Mode: MaxPerformance
Members:
GRAZ - Primary database
WIEN - Physical standby database
TIROL - Snapshot standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 51 seconds ago)
DGMGRL> convert database 'TIROL' to physical standby;
Converting database "TIROL" to a Physical Standby database, please wait...
Oracle Clusterware is restarting database "TIROL" ...
Connected to "TIROL"
Continuing to convert database "TIROL" ...
Database "TIROL" converted successfully
DGMGRL> show configuration;
Configuration - stby
Protection Mode: MaxPerformance
Members:
GRAZ - Primary database
WIEN - Physical standby database
TIROL - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 56 seconds ago)
Comments
Post a Comment