Active dataguard means, the standby database is open with read only mode, even when redo logs are getting applied in real time.
Below are the benefit of using active dataguard.
- Reporting queries can be offloaded to standby database.
- Physical block corruptions are repaired automatically either at primary or physical standby database.
- RMAN backups can be initiated from standby , instead of primary which will reduce cpu load from primary.
NOTE – To use active dataguard, you need additional license from oracle
Let’s say we have a physical standby database which is in mount state. Implement below steps to enable active dataguard database.
1. Cancel the media recovery on physical standby.
SQL> alter database recover managed standby database cancel;
2. Open the database[PHYSICAL STANDBY]
SQL> alter database open; Database altered.
3. Start media recovery with real-time log apply[PHYSICAL STANDBY]
SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered.
4. Check the database status:[PHYSICAL STANDBY]
SQL> select name,open_mode from v$database; NAME OPEN_MODE --------- -------------------- PRODDB READ ONLY WITH APPLY SQL> select process,status,sequence# from v$managed_standby; PROCESS STATUS SEQUENCE# --------- ------------ ---------- ARCH CONNECTED 0 ARCH CONNECTED 0 ARCH CONNECTED 0 ARCH CONNECTED 0 ARCH CONNECTED 0 RFS IDLE 0 RFS RECEIVING 510 RFS IDLE 0 RFS IDLE 4178 MRP0 APPLYING_LOG 510 --->>>> MRP PROCESS
Now active dataguard has been enabled.
please provide datagaurd setup steps.
Ram,
All data guard related documents are listed here – >
https://dbaclass.com/dataguard/
Regards
below should be corect since we are not use alter database open for read only
2. Open the database[PHYSICAL STANDBY]
SQL> alter database open;
Database altered.
corrected steps
SQL> alter database open read only;
Database altered.
Dear Udara,
In physical standby, whether you run ALTER DATABASE OPEN (or) ALTER DATABASE OPEN READ ONLY,
Both will open the database in read only mode only.
So you can run any one of the command.
Hi,
can you please explain below points ?
1. why we need to disconnect real-time log apply process before we bring up standby database to read only mode?
2. once DB read only mode and users are connected , can we apply logs or need to clear all user sessions to start real-time log apply ?
Thanks,
Udara