Active Data Guard and redo compression
Table of contents
Preamble
Before going further it’s worth to mention that both features required the licensing of an Enterprise option (Active Data Guard and Advanced Compression for Redo Compression). As usual with Oracle Corporation no warning will be displayed and no license file to install…
Active Data Guard allow you to read only query your physical standby for reporting purpose.
Redo compression, as its name stand for, allow you to compress redo to optimize your network and speed up redo transfer to your standby databases (with obviously small CPU overhead). If your sites are far from each others the main bottleneck is most probably the network and not the small amount of CPU that this option will use…
Active Data Guard
When you try to select something on your physical standby you hit below error message:
SQL> select * from yjaquier.test;
select * from yjaquier.test
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
And in a way it sounds normal as the database is open in MOUNT state…
If you check at Data Guard Broker (DGB) level:
DGMGRL> show configuration
Configuration - DGConfig1
Protection Mode: MaxPerformance
Databases:
rac1 - Primary database
rac2 - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> show database rac2
Database - rac2
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: OFF
Instance(s):
rac2
Database Status:
SUCCESS
To activate Active Data Guard, open your standby database in READ ONLY (no DGB command to do it):
SQL> alter database open read only; Database altered.
Check status in DGB:
DGMGRL> show database rac2
Database - rac2
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: ON
Instance(s):
rac2
Database Status:
SUCCESS
Now you can issue query on your physical standby:
SQL> select * from yjaquier.test;
VAL DESCR
---------- --------------------
1 One
2 Two
3 Three
Obviously updating is still forbidden, to do such things you have to move to logical standby:
SQL> insert into yjaquier.test values(4,'Four');
insert into yjaquier.test values(4,'Four')
*
ERROR at line 1:
ORA-16000: database open for read-only access
To revert back to original state, shutdown your standby database and open it in MOUNT state.
Redo Compression
To activate redo compression there is only one online parameter to modify:
DGMGRL> edit database rac2 set property RedoCompression='enable'; Property "redocompression" updated DGMGRL> show database verbose rac2 redocompression; RedoCompression = 'enable'
I suppose that for a switchover situation the parameter must also be activated on the primary instance.
And that’s it ! Nothing more to do except checking you bought advanced compression Enterprise option that is fortunately bringing many other added value…




