Now we move from Standby Redo Logs to the component that feeds them: Redo Transport Services.
This is where Data Guard starts becoming really interesting from an architecture and troubleshooting perspective.
The objective is not just to make redo move from primary to standby. The objective is to understand how Oracle transports redo, what happens when the network fails, how commit latency is affected, and how to design transport according to the required RPO/RTO.
1. The Complete Redo Flow
Our architecture is now:
PRIMARY RAC
┌────────────────────┐
│ │
PROD1 PROD2
THREAD 1 THREAD 2
│ │
└─────────┬──────────┘
│
LGWR/ARCH
│
Redo Transport
│
Oracle Net
│
▼
┌──────────────────┐
│ STANDBY RAC │
│ │
│ RFS │
│ ↓ │
│ SRL │
│ ↓ │
│ MRP │
│ ↓ │
│ Datafiles │
└──────────────────┘
The key question is:
How exactly does redo leave the primary and arrive at the standby?
That’s the job of Redo Transport Services.
2. What Is Redo Transport?
Redo Transport Services is the Data Guard mechanism responsible for transmitting redo from the primary database to one or more destinations.
The primary can transport redo using:
ARCH LGWR
and the transport can be configured with:
ASYNC SYNC
and:
AFFIRM NOAFFIRM
These choices have a direct impact on:
- performance
- commit latency
- RPO
- availability
- data protection
3. The Main Parameter
The most important parameter is:
LOG_ARCHIVE_DEST_n
For example:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2= ' SERVICE=PRODDB_DR ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRODDB_DR' SCOPE=BOTH SID='*';
This tells Oracle:
Send redo ↓ to PRODDB_DR ↓ using ASYNC transport ↓ for online redo ↓ when this database is PRIMARY
4. LOG_ARCHIVE_CONFIG
Before configuring destinations, establish the Data Guard configuration.
Example:
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRODDB,PRODDB_DR)' SCOPE=BOTH SID='*';
This defines the databases participating in the Data Guard configuration.
For a two-site environment:
DG_CONFIG PRODDB PRODDB_DR
For multiple standbys:
DG_CONFIG= (PRODDB, PRODDB_DR, PRODDB_DR2)
5. DB_UNIQUE_NAME Is Critical
Remember our architecture:
Primary: DB_NAME = PRODDB DB_UNIQUE_NAME = PRODDB Standby: DB_NAME = PRODDB DB_UNIQUE_NAME = PRODDB_DR
The destination should therefore use:
DB_UNIQUE_NAME=PRODDB_DR
not:
DB_NAME=PRODDB
This distinction becomes extremely important when you have:
- multiple standbys
- Data Guard Broker
- switchover
- failover
- cascaded standby
6. Oracle Net Service
Our primary needs to resolve:
PRODDB_DR
For example:
PRODDB_DR =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = dr-scan.example.com)
(PORT = 1521)
)
(CONNECT_DATA =
(SERVICE_NAME = PRODDB_DR)
)
)
Test:
tnsping PRODDB_DR
Then:
sqlplus sys@PRODDB_DR as sysdba
7. ARCH Transport
Historically, Oracle Data Guard could transport redo using archived redo logs.
Conceptually:
LGWR | v Online Redo | v ARCn | v Archived Redo | v Standby
The archive process ships archived redo to the standby.
This is generally less suitable when you need the lowest possible redo transport latency.
8. LGWR Transport
With LGWR transport:
LGWR | v Redo | v Network | v Standby RFS | v SRL
This is the architecture used for modern real-time Data Guard configurations.
LGWR transport is especially important for:
SYNC Maximum Availability Maximum Protection Real-Time Apply
9. ASYNC
With:
ASYNC
the primary does not normally wait for the standby to confirm every redo write before continuing.
Conceptually:
Primary | | Generate redo | +--------> Standby | Continue
This is excellent for:
- long-distance DR
- WAN links
- minimizing primary commit impact
- Maximum Performance
10. SYNC
With:
SYNC
the transport becomes part of the transaction protection mechanism.
Conceptually:
Primary | | redo v Standby | | acknowledgment v Primary | v Commit continues
Therefore network latency becomes extremely important.
A poor WAN connection can make SYNC unacceptable.
11. ASYNC Example
A common Maximum Performance configuration:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2= 'SERVICE=PRODDB_DR ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRODDB_DR' SCOPE=BOTH SID='*';
This means:
Online redo
↓
LGWR
↓
ASYNC transport
↓
PRODDB_DR
12. SYNC Example
For stronger protection:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2= 'SERVICE=PRODDB_DR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRODDB_DR' SCOPE=BOTH SID='*';
Now standby persistence becomes much more important.
13. AFFIRM vs NOAFFIRM
This is often misunderstood.
AFFIRM
Oracle waits for confirmation that redo has been written to the standby redo log before the transport acknowledgment is returned.
Conceptually:
Primary | v Network | v RFS | v SRL write | v ACK | v Primary
NOAFFIRM
The acknowledgment behavior is less strict regarding disk persistence at the standby.
This can reduce latency.
14. Typical Combinations
You will commonly see:
SYNC AFFIRM SYNC NOAFFIRM ASYNC AFFIRM ASYNC NOAFFIRM
But don’t select these combinations randomly.
The correct choice depends on the protection requirement.
A useful starting matrix:
| Configuration | Typical Objective |
|---|---|
| ASYNC NOAFFIRM | Maximum Performance |
| ASYNC | Remote DR |
| SYNC NOAFFIRM | Lower-latency stronger transport |
| SYNC AFFIRM | Strongest persistence semantics |
The exact protection-mode behavior should always be validated against your Oracle 19c configuration and operational requirements.
15. Maximum Performance
The usual architecture is:
LGWR ASYNC
Example:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2= 'SERVICE=PRODDB_DR ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRODDB_DR' SCOPE=BOTH SID='*';
Conceptually:
Commit | +----> local redo | +----> standby transport asynchronously
Primary performance is largely independent of standby network latency.
The tradeoff:
Potential data loss
if the primary fails before the last redo reaches the standby.
16. Maximum Availability
The goal is:
Transactions should not be committed until redo has been safely received by a synchronized standby, but the primary should remain available if the standby becomes unavailable.
A typical configuration uses:
SYNC
with appropriate availability semantics.
The architecture:
Primary | | SYNC v Standby | v Redo persisted | v Primary continues
If the standby becomes unavailable, Oracle can continue operating according to the configured availability behavior.
This is one of the most useful configurations for enterprise systems.
17. Maximum Protection
Maximum Protection is the strongest protection mode.
The idea is:
No commit unless redo is safely persisted on at least one synchronized standby.
Conceptually:
PRIMARY | | SYNC v STANDBY | | persistent redo v ACK | v COMMIT
This minimizes the possibility of data loss.
But there is a price:
If the required standby becomes unavailable, the primary may be forced to stop processing transactions.
Therefore this mode requires very careful architecture.
18. Protection Mode vs Transport Mode
Don’t confuse:
LOG_ARCHIVE_DEST_n
with:
Protection Mode
Transport attributes determine how redo is shipped.
Protection mode determines how strongly the database protects committed transactions.
Think:
Transport
↓
How redo moves
Protection Mode
↓
What Oracle requires before commit
19. VALID_FOR
One of the most important attributes is:
VALID_FOR
Example:
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
This says the destination is valid when:
Redo source = online redo logs Database role = primary
This becomes extremely valuable during:
switchover failover
because destinations can be configured to behave correctly based on the current database role.
20. Why VALID_FOR Matters
Imagine:
PRODDB | v PRODDB_DR
After switchover:
PRODDB_DR | v PRODDB
The database roles have changed.
If you configure destinations properly using:
VALID_FOR DB_UNIQUE_NAME
Oracle can use the correct transport destinations according to the current role.
This is a key part of a role-transition-ready configuration.
21. REOPEN
Network problems happen.
You can configure:
REOPEN
For example:
LOG_ARCHIVE_DEST_2= 'SERVICE=PRODDB_DR ASYNC REOPEN=60 ... '
This tells Oracle to retry the destination after a failure.
For example:
Network failure
↓
Destination error
↓
Wait 60 seconds
↓
Retry
22. NET_TIMEOUT
For SYNC transport, network timeout becomes very important.
Example:
NET_TIMEOUT=30
This controls how long Oracle waits for a response from the standby before considering the transport operation timed out.
Don’t blindly choose:
NET_TIMEOUT=1
or:
NET_TIMEOUT=600
Measure the real network characteristics.
23. WAN Latency
Suppose:
Primary → DR RTT = 80 ms
and you use:
SYNC
You have introduced a network path into the commit architecture.
Now imagine:
RTT = 250 ms
For a high-transaction OLTP system, that can become a serious problem.
This is why:
SYNC ≠ automatically better
It is better only if the infrastructure can support it.
24. Transport Compression
You can consider:
COMPRESSION=ENABLE
for appropriate Data Guard transport configurations.
Compression can be useful when:
Network bandwidth is limited + CPU capacity is available
But if your network is already:
100 Gbps
and CPU is heavily utilized, compression may not provide a benefit.
Measure.
25. Encryption
Since we previously configured Oracle Net encryption in the security series, remember that Data Guard traffic also travels through Oracle Net.
Architecture:
Primary | | encrypted Oracle Net v Network | | encrypted v Standby
This protects redo transport from network interception.
But encryption consumes CPU.
For high-volume redo environments, monitor:
CPU utilization redo generation network throughput transport lag
26. Enable Destination
Once the standby is ready:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=BOTH SID='*';
Check:
SELECT dest_id,
status,
target,
destination,
error
FROM v$archive_dest
WHERE dest_id = 2;
Expected:
STATUS ------ VALID
27. Check Destination Details
Use:
SELECT dest_id,
status,
type,
database_mode,
recovery_mode,
protection_mode,
destination,
db_unique_name,
error
FROM v$archive_dest
WHERE dest_id = 2;
This is a useful first-level health check.
28. Check V$ARCHIVE_DEST_STATUS
For more Data Guard-specific information:
SELECT dest_id,
status,
type,
database_mode,
recovery_mode,
gap_status,
synchronized,
synchronization_status,
error
FROM v$archive_dest_status
WHERE dest_id = 2;
This view is extremely useful during troubleshooting.
29. Generate Redo
On the primary:
ALTER SYSTEM SWITCH LOGFILE;
Then:
SELECT thread#,
sequence#,
first_time
FROM v$log_history
ORDER BY first_time DESC
FETCH FIRST 10 ROWS ONLY;
On the standby:
SELECT thread#,
sequence#,
applied
FROM v$archived_log
ORDER BY first_time DESC
FETCH FIRST 10 ROWS ONLY;
30. Test Transport With Multiple RAC Threads
Because our primary is RAC:
PROD1 → THREAD 1 PROD2 → THREAD 2
Generate redo from both instances.
For example:
ALTER SYSTEM SWITCH LOGFILE;
from the appropriate RAC instance.
Then inspect:
SELECT thread#,
MAX(sequence#) last_sequence
FROM gv$log_history
GROUP BY thread#
ORDER BY thread#;
On standby:
SELECT thread#,
MAX(sequence#) last_received
FROM v$archived_log
GROUP BY thread#
ORDER BY thread#;
This is much more useful than testing only one RAC thread.
31. Calculate Transport Lag
On standby:
SELECT name,
value,
datum_time
FROM v$dataguard_stats
WHERE name = 'transport lag';
Example:
NAME VALUE ---------------- --------------- transport lag +00 00:00:01
If you see:
+00 00:30:00
that’s not a healthy production state unless deliberately expected.
32. Calculate Apply Lag
SELECT name,
value,
datum_time
FROM v$dataguard_stats
WHERE name = 'apply lag';
You want to distinguish:
Transport lag
from:
Apply lag
These indicate different problems.
33. Transport Lag vs Apply Lag
Transport lag
Primary generated redo
↓
gap
↓
Standby hasn't received it yet
Likely causes:
Network Transport process Destination failure Primary/standby connectivity
Apply lag
Redo has arrived
↓
MRP can't apply quickly enough
Likely causes:
Standby CPU Storage I/O SQL apply workload Long-running transactions
This distinction is critical in troubleshooting.
34. Transport Health Query
Here’s a useful production query:
SELECT
dest_id,
status,
target,
db_unique_name,
error,
destination
FROM v$archive_dest
WHERE target = 'STANDBY';
Then:
SELECT
name,
value,
unit
FROM v$dataguard_stats
WHERE name IN
(
'transport lag',
'apply lag',
'apply finish time'
);
35. Common Error: ORA-16057
Example:
ORA-16057: DGID from server not in Data Guard configuration
Typical things to check:
DB_UNIQUE_NAME LOG_ARCHIVE_CONFIG Destination configuration
Check:
SHOW PARAMETER log_archive_config;
and:
SHOW PARAMETER db_unique_name;
36. Common Error: ORA-12514
If transport fails with:
ORA-12514
check:
tnsping PRODDB_DR lsnrctl status
and:
sqlplus sys@PRODDB_DR as sysdba
Don’t troubleshoot Data Guard until Oracle Net works independently.
37. Common Error: ORA-16191
If you encounter:
ORA-16191: Primary log shipping client not logged on standby
check:
Password file SYS credentials REMOTE_LOGIN_PASSWORDFILE Oracle Net
On both sides:
SHOW PARAMETER remote_login_passwordfile;
Typically:
EXCLUSIVE
is used.
38. Common Error: ORA-16055
For:
ORA-16055: FAL request rejected
investigate:
archive gap FAL configuration connectivity missing archive logs
We will cover FAL and gap resolution in detail later.
39. LOG_ARCHIVE_DEST_STATE_n
A destination can be:
ENABLE DEFER ALTERNATE
For example:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=DEFER SCOPE=BOTH SID='*';
This stops transport to the destination without deleting its configuration.
Re-enable:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=BOTH SID='*';
This is useful during controlled maintenance.
40. ALTERNATE
Data Guard can also be configured with alternate destinations.
For example:
DEST_2 → Primary DR DEST_3 → Alternate DR
If the preferred destination fails, Oracle can use an alternate configuration depending on how it is defined.
This becomes useful in complex enterprise architectures.
41. Multiple Standbys
Imagine:
PRIMARY
|
+---------+---------+
| |
v v
PRODDB_DR1 PRODDB_DR2
Local DR Remote DR
You might configure:
DEST_2 → PRODDB_DR1 DEST_3 → PRODDB_DR2
Then each destination can have different characteristics:
DR1: SYNC DR2: ASYNC
This gives you different protection layers.
42. Example Enterprise Configuration
For example:
Primary | +---- SYNC ----> Local DR | +---- ASYNC ---> Remote DR
This can provide:
Local DR
↓
fast failover / low RPO
Remote DR
↓
geographical disaster protection
This is a much more realistic enterprise design than simply having one standby.
43. Cascaded Standby
Another architecture:
PRIMARY | v STANDBY 1 | v STANDBY 2
This is called a cascaded configuration.
It can reduce the number of transport connections from the primary.
For example:
Primary | | SYNC/ASYNC v Regional DR | | ASYNC v Remote DR
We’ll cover cascaded configurations later.
44. Data Guard Transport and RPO
A useful way to think about it:
RPO ≈ amount of redo that can be lost
With:
ASYNC
you may have a small amount of redo not yet received.
With:
SYNC
the goal is to eliminate that transport window for protected transactions, assuming the configuration and standby are healthy.
Therefore:
RPO requirement
↓
Transport design
↓
Protection mode
45. Data Guard Transport and RTO
Transport isn’t the whole RTO story.
RTO depends on:
Detection + Decision + Failover + Instance startup + Recovery + Application reconnection
But transport and apply lag directly influence how much recovery work remains.
If:
Apply lag = 30 minutes
your failover process may have significantly more work.
If:
Apply lag ≈ 0
failover becomes much more predictable.
46. Expert Monitoring
Don’t monitor only:
Database UP/DOWN
Monitor:
Transport status Transport lag Apply lag Redo generation rate Apply rate Archive gaps RFS MRP SRL usage Network latency Network errors
A Data Guard monitoring system should answer:
How far behind is my standby, and why?
47. A Practical Monitoring Script
On standby:
SET LINESIZE 220
COLUMN name FORMAT A25
COLUMN value FORMAT A30
COLUMN unit FORMAT A20
SELECT
name,
value,
unit
FROM v$dataguard_stats
WHERE name IN
(
'transport lag',
'apply lag',
'apply finish time'
);
SELECT
process,
status,
thread#,
sequence#
FROM v$managed_standby
ORDER BY process;
Then:
SELECT
dest_id,
status,
database_mode,
recovery_mode,
gap_status,
synchronized,
synchronization_status,
error
FROM v$archive_dest_status
WHERE target='STANDBY';
This gives you a quick operational picture.
48. A More Modern 19c Process Check
Use:
SELECT
name,
role,
action,
client_role,
thread#,
sequence#
FROM v$dataguard_process
ORDER BY name;
This should become part of your normal Data Guard troubleshooting toolkit.
49. Recommended Starting Configuration
For our lab:
Primary: PRODDB Standby: PRODDB_DR Transport: LGWR ASYNC Standby: SRLs enabled Apply: Real-Time Apply
Example:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2= 'SERVICE=PRODDB_DR ASYNC NOAFFIRM REOPEN=60 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRODDB_DR' SCOPE=BOTH SID='*';
Then:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=BOTH SID='*';
50. Validate the Configuration
Primary:
SELECT
dest_id,
status,
target,
db_unique_name,
error
FROM v$archive_dest
WHERE dest_id=2;
Then:
SELECT
dest_id,
status,
gap_status,
synchronized,
synchronization_status,
error
FROM v$archive_dest_status
WHERE dest_id=2;
Standby:
SELECT
name,
value,
unit
FROM v$dataguard_stats
WHERE name IN
(
'transport lag',
'apply lag'
);
51. The Expert Mental Model
You should now be able to trace one redo record through the architecture:
Transaction
|
v
LGWR
|
v
Online Redo Log
|
v
Redo Transport
|
+---- ASYNC/SYNC
|
+---- AFFIRM/NOAFFIRM
|
+---- Oracle Net
|
v
RFS
|
v
Standby Redo Log
|
v
MRP
|
v
Datafile
If something breaks, you can identify which stage failed.
That’s much more valuable than memorizing Data Guard commands.
52. Part 6 — Final Checklist
Before moving on:
✓ LOG_ARCHIVE_CONFIG configured ✓ DB_UNIQUE_NAME correct ✓ Oracle Net tested ✓ LOG_ARCHIVE_DEST_n configured ✓ VALID_FOR understood ✓ DB_UNIQUE_NAME destination defined ✓ LGWR/ARCH transport understood ✓ ASYNC/SYNC understood ✓ AFFIRM/NOAFFIRM understood ✓ REOPEN configured ✓ NET_TIMEOUT understood ✓ Transport destination ENABLED ✓ RFS receiving redo ✓ SRLs receiving redo ✓ MRP applying redo ✓ Transport lag checked ✓ Apply lag checked ✓ RAC threads tested


