Now we move to one of the most important parts of a serious Data Guard implementation.
A standby can exist without properly configured Standby Redo Logs (SRLs), but a production-grade Data Guard architecture should use them, especially when you want Real-Time Apply, low RPO, and predictable recovery behavior.
1. What Are Standby Redo Logs?
On the primary, redo is generated in:
Online Redo Logs
|
v
LNS / transport
|
v
Standby Redo Logs
|
v
RFS
|
v
MRP
|
v
Datafiles
The important distinction is:
Primary
LGWR | v Online Redo Log
Standby
RFS | v Standby Redo Log | v MRP | v Datafiles
The standby redo log is therefore the landing area for redo received from the primary before it is applied.
2. Why Not Just Use Archived Logs?
Without SRLs, the standby can receive redo as archived logs and then apply them.
Conceptually:
PRIMARY
Online Redo
|
v
Archive Log
|
v
Network
|
v
STANDBY
Archived Log
|
v
MRP
|
v
Datafiles
With SRLs:
PRIMARY
Online Redo
|
| LGWR
v
Network
|
v
STANDBY
Standby Redo Log
|
| Real-Time Apply
v
MRP
|
v
Datafiles
The second architecture significantly reduces the gap between redo generation and redo application.
3. Real-Time Apply
This is one of the main reasons SRLs exist.
With Real-Time Apply:
Redo generated
↓
Redo transported
↓
Redo written to SRL
↓
MRP reads SRL
↓
Redo applied
The standby doesn’t have to wait for the primary redo log to be archived before applying the redo.
That is particularly important for:
- low RPO
- high transaction volume
- synchronous transport
- Data Guard Broker
- Fast-Start Failover
- Active Data Guard
4. Our RAC Architecture
Let’s continue with our example.
Primary:
PRODDB
├── prod-rac01
│ THREAD 1
│
└── prod-rac02
THREAD 2
Standby:
PRODDB_DR ├── dr-rac01 │ └── dr-rac02
Primary online redo:
THREAD 1 Group 1 Group 2 Group 3 THREAD 2 Group 4 Group 5 Group 6
Each thread needs corresponding standby redo capacity.
5. The Golden Rule
For a non-RAC database, a commonly used minimum is:
Number of SRL groups >= number of online redo log groups + 1
For RAC, apply the rule per redo thread.
For example:
Thread 1: 3 online redo groups Thread 2: 3 online redo groups
A good design would be:
Thread 1: 4 SRL groups Thread 2: 4 SRL groups
Total:
8 SRL groups
This is the minimum-style design we’ll use for the example.
6. Why +1?
Suppose Thread 1 has:
3 online redo groups
We create:
4 standby redo groups
Why?
Because while one SRL is being written to, another may be needed while the previous one is being archived/applied/reused.
The extra group provides operational headroom.
For a high-end production system, you may choose even more.
7. SRL Size
SRLs should normally be at least as large as the largest online redo log they correspond to.
For example:
Primary: Redo Group 1 = 4 GB Redo Group 2 = 4 GB Redo Group 3 = 4 GB
Then:
SRL = 4 GB minimum
Don’t create:
Online redo = 4 GB SRL = 1 GB
That is a poor design.
8. Check Primary Redo Size
Run on the primary:
SELECT thread#,
group#,
ROUND(bytes/1024/1024/1024,2) AS size_gb,
members,
status
FROM gv$log
ORDER BY thread#, group#;
Example:
THREAD# GROUP# SIZE_GB MEMBERS STATUS ------- ------ ------- ------- -------- 1 1 4 2 CURRENT 1 2 4 2 INACTIVE 1 3 4 2 INACTIVE 2 4 4 2 CURRENT 2 5 4 2 INACTIVE 2 6 4 2 INACTIVE
Therefore:
Thread 1 → 4 SRLs × 4 GB Thread 2 → 4 SRLs × 4 GB
Total:
32 GB
of standby redo capacity.
9. Important RAC Rule
This is where many Data Guard configurations go wrong.
Don’t simply run:
ALTER DATABASE ADD STANDBY LOGFILE ...
without specifying the correct thread.
For RAC, SRLs are associated with redo threads.
For example:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 4G;
and:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 4G;
10. Check Existing SRLs
After the RMAN duplicate, first check:
SELECT thread#,
group#,
ROUND(bytes/1024/1024/1024,2) AS size_gb,
status,
archived
FROM v$standby_log
ORDER BY thread#, group#;
If nothing is returned:
no rows selected
that’s normal if SRLs weren’t created during the duplicate.
11. Compare Online Redo vs SRLs
A useful query:
SELECT thread#,
COUNT(*) AS online_groups,
ROUND(MAX(bytes)/1024/1024/1024,2) AS max_online_size_gb
FROM v$log
GROUP BY thread#
ORDER BY thread#;
Then:
SELECT thread#,
COUNT(*) AS standby_groups,
ROUND(MAX(bytes)/1024/1024/1024,2) AS max_standby_size_gb
FROM v$standby_log
GROUP BY thread#
ORDER BY thread#;
Compare the two.
12. Creating SRLs in ASM
Because we’re using ASM:
+DATA
we can allow Oracle to manage the filenames.
For Thread 1:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 4G;
Repeat:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 4G;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 4G;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 4G;
That’s four SRLs for Thread 1.
13. Thread 2
Create four for Thread 2:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 4G;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 4G;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 4G;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 4G;
Now we have:
THREAD 1 → 4 SRLs THREAD 2 → 4 SRLs
14. Verify
Run:
SELECT thread#,
group#,
ROUND(bytes/1024/1024/1024,2) size_gb,
status,
archived
FROM v$standby_log
ORDER BY thread#, group#;
Expected conceptually:
THREAD# GROUP# SIZE_GB STATUS ------- ------ ------- ---------- 1 7 4 UNASSIGNED 1 8 4 UNASSIGNED 1 9 4 UNASSIGNED 1 10 4 UNASSIGNED 2 11 4 UNASSIGNED 2 12 4 UNASSIGNED 2 13 4 UNASSIGNED 2 14 4 UNASSIGNED
The actual group numbers will depend on your database.
15. Don’t Assume Group Numbers
Never write scripts assuming:
SRL = group 7 SRL = group 8
because your environment may have different existing redo groups.
Always discover them:
SELECT group#,
thread#,
bytes
FROM v$standby_log
ORDER BY thread#, group#;
16. SRLs Should Be Multiplexed?
This is an important design question.
Primary online redo is commonly multiplexed:
Group 1 ├── Member A └── Member B
For SRLs, you can also use multiple members.
For example:
SRL Group 7 ├── +DATA └── +RECO
However, with ASM, the redundancy is often handled at the ASM disk-group level.
If:
+DATA = NORMAL redundancy
ASM itself provides mirroring.
So you should design SRL redundancy together with the ASM redundancy model rather than blindly duplicating files.
17. Should SRLs Be on +RECO?
You might see configurations such as:
+DATA +RECO
and wonder whether SRLs should go to +RECO.
There is no universal rule.
The important considerations are:
I/O throughput I/O contention ASM redundancy Storage architecture FRA workload Recovery requirements
For example:
+DATA ├── Datafiles └── SRLs +RECO ├── FRA ├── Archive logs └── Flashback
can be perfectly valid.
18. SRL Performance Matters
Consider:
Primary redo generation: 500 MB/s
The standby must continuously handle:
Network reception + SRL writes + Redo apply
If the SRL storage is slow:
Primary | v Network | v SRL ← bottleneck | v MRP
your transport/apply performance suffers.
This is why SRLs are not just a checkbox.
19. Standby Redo Logs and SYNC Transport
If you eventually configure:
LGWR SYNC
the primary can be affected by standby transport performance.
Conceptually:
Primary LGWR
|
| SYNC
v
Network
|
v
Standby RFS
|
v
SRL
The primary’s commit latency can depend on the transport configuration and protection mode.
Therefore:
SRL storage performance can become part of the primary transaction latency path.
This is a critical production design consideration.
20. ASYNC vs SYNC
ASYNC
Primary | | LGWR ASYNC v Standby
Primary doesn’t wait for standby acknowledgment for every commit.
SYNC
Primary | | LGWR SYNC v Standby | v Acknowledgment | v Primary commit
SYNC can provide stronger data protection but requires excellent network and standby infrastructure.
21. SRLs and Protection Modes
Data Guard protection modes:
Maximum Performance Maximum Availability Maximum Protection
SRLs are particularly important when using:
LGWR + SYNC + Real-Time Apply
because the standby must be able to receive and persist redo efficiently.
22. Real-Time Apply
Once SRLs exist, enable real-time apply.
On the standby:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
On modern 19c environments, Oracle can automatically use real-time apply behavior depending on configuration, so don’t rely solely on the presence of this syntax.
The important thing is to verify the actual state, not just execute a command and assume it worked.
23. Verify MRP
Run:
SELECT process,
status,
thread#,
sequence#
FROM v$managed_standby
ORDER BY process;
You may see:
PROCESS STATUS THREAD# SEQUENCE# ------- ------------- ------- --------- RFS RECEIVING 1 1250 MRP0 APPLYING_LOG 1 1249
This is what we want to see conceptually:
RFS → receiving MRP → applying
24. Modern Data Guard Process Monitoring
In Oracle 19c, also use:
SELECT name,
role,
action,
client_role,
thread#,
sequence#
FROM v$dataguard_process
ORDER BY name;
This provides more detailed visibility into Data Guard processes.
For troubleshooting, I recommend becoming comfortable with both:
V$MANAGED_STANDBY V$DATAGUARD_PROCESS
25. Verify SRL Usage
After redo starts flowing:
SELECT group#,
thread#,
sequence#,
archived,
status
FROM v$standby_log
ORDER BY thread#, group#;
You may see:
GROUP# THREAD# SEQUENCE# ARCHIVED STATUS ------ ------- --------- -------- ------------- 7 1 1251 NO ACTIVE 8 1 1248 YES UNASSIGNED 9 1 1249 YES UNASSIGNED 10 1 1250 YES UNASSIGNED
The exact values depend on timing.
26. A Better SRL Validation Query
Use:
SELECT
thread#,
COUNT(*) AS srl_groups,
ROUND(MIN(bytes)/1024/1024/1024,2) AS min_size_gb,
ROUND(MAX(bytes)/1024/1024/1024,2) AS max_size_gb
FROM v$standby_log
GROUP BY thread#
ORDER BY thread#;
Then compare against:
SELECT
thread#,
COUNT(*) AS online_groups,
ROUND(MIN(bytes)/1024/1024/1024,2) AS min_size_gb,
ROUND(MAX(bytes)/1024/1024/1024,2) AS max_size_gb
FROM v$log
GROUP BY thread#
ORDER BY thread#;
27. Expert SRL Validation Logic
For every thread, verify:
SRL count >= online redo groups + 1
and:
SRL size >= largest online redo log
So if:
Thread 1: Online = 5 groups Largest = 8 GB
we should have at least:
6 SRLs 8 GB each
for Thread 1.
28. What About More Than +1?
For a heavily loaded system, you may intentionally create more.
For example:
Online redo: 6 groups SRL: 8 groups
This can provide additional flexibility during:
- transport bursts
- heavy redo generation
- network interruptions
- delayed apply
- maintenance
But don’t create dozens of SRLs without understanding why.
29. What Happens During Network Interruption?
Imagine:
Primary | X Network failure | Standby
The primary continues generating redo depending on its transport configuration.
Once connectivity returns:
Primary | | Missing redo v Standby
SRLs help the standby receive redo continuously when transport resumes.
The standby can then continue applying the incoming redo.
30. SRL vs Archived Log
Think of them this way:
Archived log
Redo history
Standby redo log
Redo currently being received
Online redo log
Redo currently generated by primary
A useful mental model:
PRIMARY STANDBY
Online Redo
|
v
Transport ------------------> Standby Redo
|
v
Real-Time
Apply
|
v
Datafiles
31. Don’t Delete SRLs While They Are Active
Before dropping an SRL, verify:
SELECT group#,
thread#,
status,
archived
FROM v$standby_log
ORDER BY thread#, group#;
You don’t want to remove an SRL that is currently required.
If you need to resize or redesign SRLs, perform the operation during a controlled maintenance window.
32. Adding SRLs After Data Guard Is Running
Suppose:
Thread 1 Online redo increased from 4 GB → 8 GB
Your existing SRLs may now be too small.
Check:
SELECT thread#,
group#,
bytes/1024/1024/1024 size_gb
FROM v$standby_log;
If the SRLs are smaller than the new redo logs, redesign them.
This is one reason to automate SRL validation.
33. A Useful Health-Check Script
Here’s a simple query you can keep in your Data Guard toolkit:
COLUMN thread# FORMAT 999
COLUMN online_groups FORMAT 999
COLUMN standby_groups FORMAT 999
COLUMN online_size_gb FORMAT 999.99
COLUMN standby_size_gb FORMAT 999.99
SELECT
l.thread#,
l.online_groups,
s.standby_groups,
l.online_size_gb,
s.standby_size_gb
FROM
(
SELECT
thread#,
COUNT(*) online_groups,
MAX(bytes)/1024/1024/1024 online_size_gb
FROM v$log
GROUP BY thread#
) l
JOIN
(
SELECT
thread#,
COUNT(*) standby_groups,
MIN(bytes)/1024/1024/1024 standby_size_gb
FROM v$standby_log
GROUP BY thread#
) s
ON l.thread# = s.thread#
ORDER BY l.thread#;
Then manually validate:
standby_groups >= online_groups + 1
and:
standby_size >= online_size
34. What If a Thread Has No SRL?
Suppose:
THREAD 1 → 4 SRLs THREAD 2 → 0 SRLs
That’s a problem in RAC.
Thread 2 can generate redo on the primary but has no dedicated standby redo capacity.
Create the required SRLs:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 4G;
until the required number is reached.
35. Disabled RAC Threads
Sometimes a RAC thread is disabled.
Check:
SELECT thread#,
status,
enabled
FROM v$thread
ORDER BY thread#;
Don’t blindly create SRLs for obsolete threads.
Your SRL design should correspond to the active redo threads that the standby is expected to receive.
36. Common Mistake #1
Mistake
Creating:
8 SRLs
but all assigned to:
THREAD 1
while the primary has:
THREAD 1 THREAD 2
Correct
Distribute them:
THREAD 1 → required SRLs THREAD 2 → required SRLs
37. Common Mistake #2
Creating SRLs smaller than online redo:
Online redo = 8 GB SRL = 4 GB
Avoid this.
Use:
SRL >= largest online redo log
38. Common Mistake #3
Creating SRLs but never enabling real-time apply.
You can have:
SRLs = configured
but still have:
Real-Time Apply = not active
Always verify the actual Data Guard process state.
39. Common Mistake #4
Ignoring ASM capacity.
Example:
+DATA free = 40 GB
and you want:
8 SRLs × 8 GB = 64 GB
Obviously this won’t work.
Check:
SELECT name,
free_mb,
usable_file_mb
FROM v$asm_diskgroup;
before creating them.
40. Common Mistake #5
Using identical redo sizes without checking the primary.
Never assume:
"All databases have 1 GB redo logs."
Always query:
SELECT thread#, group#, bytes FROM gv$log;
and design based on reality.
41. Recommended Enterprise Design
For our RAC example:
PRIMARY Thread 1 ├── ORL 1 = 4 GB ├── ORL 2 = 4 GB └── ORL 3 = 4 GB Thread 2 ├── ORL 4 = 4 GB ├── ORL 5 = 4 GB └── ORL 6 = 4 GB
Standby:
Thread 1 ├── SRL 7 = 4 GB ├── SRL 8 = 4 GB ├── SRL 9 = 4 GB └── SRL 10 = 4 GB Thread 2 ├── SRL 11 = 4 GB ├── SRL 12 = 4 GB ├── SRL 13 = 4 GB └── SRL 14 = 4 GB
This gives:
3 online + 1 SRL
per thread.
42. Production Architecture
Putting everything together:
PRIMARY RAC
┌──────────────────────┐
│ │
PROD1 PROD2
THREAD 1 THREAD 2
│ │
└──────────┬────────────┘
│
LGWR
│
Data Guard
Transport
│
▼
┌──────────────────────┐
│ STANDBY RAC │
│ │
│ RFS → SRL → MRP │
│ │
│ Thread 1 SRLs │
│ Thread 2 SRLs │
│ │
│ +DATA │
│ +RECO │
└──────────────────────┘
This is the foundation for the next stages of the Masterclass.
43. Part 5 — Final Checklist
Before moving forward, verify:
✓ Primary redo groups identified ✓ RAC threads identified ✓ Largest online redo size identified ✓ SRLs created for every active thread ✓ SRL count >= ORL count + 1 per thread ✓ SRL size >= largest ORL ✓ ASM capacity verified ✓ SRL storage architecture validated ✓ RFS receiving redo ✓ MRP applying redo ✓ Real-Time Apply verified ✓ Transport lag monitored ✓ Apply lag monitored


