Active Data Guard is the option when the standby database is configured to be in its status open with read-only mode. As explained below in the white paper “Oracle (Active) Data Guard 19c Real-Time Data Protection and Availability,” there are some benefits, dated March 2019:
With this in mind, the current post is about enabling your Physical Standby database as an Active Data Guard. Taking as a primary step that you already have a configured Physical Standby database, this post follows the procedures below:
- CANCEL the current managed recovery in the Physical Standby database;
- STOP the Physical Standby database (if Oracle RAC, shutdown in all nodes);
- START the Physical Standby database in MOUNTED state (if Oracle RAC, start in all nodes);
- OPEN the Physical Standby database (if Oracle RAC, shutdown in all nodes);
- ENABLE managed recovery in the Physical Standby database;
All these steps mentioned above, except the shutdown part, it is shown in the example below:
-- STARTING FROM step "START the Physical Standby database in MOUNTED state (if Oracle RAC, start in all nodes);" SQL> conn /as sysdba Connected. SQL> alter database recover managed standby database cancel; Database altered. SQL> alter database open; Database altered. SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered. SQL> select name,open_mode from v$database; NAME OPEN_MODE --------- -------------------- TECHDB1 READ ONLY WITH APPLY SQL> select process,status,sequence# from v$managed_standby; PROCESS STATUS SEQUENCE# --------- ------------ ---------- DGRD ALLOCATED 0 ARCH CLOSING 292859 DGRD ALLOCATED 0 ARCH CLOSING 311792 ARCH CLOSING 292860 ARCH CLOSING 311791 RFS IDLE 292861 MRP0 APPLYING_LOG 292861 RFS IDLE 0 RFS IDLE 0 RFS IDLE 311793 11 rows selected. SQL> conn /as sysdba Connected. SQL> select name,open_mode from v$database; NAME OPEN_MODE --------- -------------------- TECHDB1 MOUNTED -- Here it is crucial to verify that all STANDBY database instances are open. Otherwise, only one instance will be behaving as an ACTIVE Data Guard, as in the example below: SQL> select name,open_mode from gv$database; NAME OPEN_MODE --------- -------------------- TECHDB1 MOUNTED TECHDB1 READ ONLY WITH APPLY SQL> alter database recover managed standby database cancel; Database altered. SQL> alter database open; Database altered. SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered. -- All instances of the Oracle RAC Data Guard database are running as an ACTIVE Data Guard: SQL> select name,open_mode from gv$database; NAME OPEN_MODE --------- -------------------- TECHDB1 READ ONLY WITH APPLY TECHDB1 READ ONLY WITH APPLY SQL> select process,status,sequence# from v$managed_standby; PROCESS STATUS SEQUENCE# --------- ------------ ---------- ARCH CONNECTED 0 DGRD ALLOCATED 0 DGRD ALLOCATED 0 ARCH CONNECTED 0 ARCH CONNECTED 0 ARCH CONNECTED 0 MRP0 APPLYING_LOG 292862 7 rows selected.
Hi! I am Bruno, a Brazilian born and bred, and I am also a naturalized Swedish citizen. I am a former Oracle ACE and, to keep up with academic research, I am a Computer Scientist with an MSc in Data Science and another MSc in Software Engineering. I have over ten years of experience working with companies such as IBM, Epico Tech, and Playtech across three different countries (Brazil, Hungary, and Sweden), and I have joined projects remotely in many others. I am super excited to share my interests in Databases, Cybersecurity, Cloud, Data Science, Data Engineering, Big Data, AI, Programming, Software Engineering, and data in general.
(Continue reading)