Introduction
A Cascaded Standby Database is an Oracle Data Guard configuration in which a standby database receives redo from another standby database instead of directly from the primary database. The intermediate standby acts as a relay, receiving redo from the primary and forwarding it to one or more downstream standby databases. A Cascaded Standby helps scale Oracle Data Guard environments by allowing one standby database to distribute redo to downstream standbys. This reduces the number of direct redo connections from the primary database.
This setup builds directly on the standby configuration methods we've covered before, specifically RMAN backup and restore, RMAN Duplicate, and restoring from the primary's service. Here we use RMAN Duplicate twice in sequence, once from the primary to build the intermediate standby, and again from that intermediate standby to build the downstream one, so it's worth being familiar with that method first if you haven't set up a single standby before.
The VALID_FOR attribute determines when a redo transport destination is active based on the type of redo logs and the current database role.
- VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) – Used on the primary database to ship redo generated from the online redo logs. This destination is active only when the database is in the PRIMARY role.
- VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) – Used on the intermediate (cascaded) standby to forward redo received in the standby redo logs to the downstream standby. This destination is active only when the database is in the STANDBY role.
Prerequisites
- Primary server with Oracle Database software installed and a running database.
- Standby servers with Oracle Database software installed.
- Network connectivity between the primary and both standby servers.
Environment Used in This Guide
| Server | Primary | Standby 1 | Standby 2 |
|---|---|---|---|
| Hostname | orcldc.oraeasy.com | orclndr.oraeasy.com | orclfdr.oraeasy.com |
| OS | OEL 9.1 | OEL 9.1 | OEL 9.1 |
| Database Version | 23.26.1.0.0 | 23.26.1.0.0 | 23.26.1.0.0 |
| SID | ORCLDC | ORCLNDR | ORCLFDR |
| Service Name | ORCLDC | ORCLNDR | ORCLFDR |
We have Primary (ORCLDC) and two standby database servers. We will call first standby (ORCLNDR) as "Near DR" and second standby (ORCLFDR) as "Far DR". For role reversal like switchover only Primary & Near DR will be used. The Far DR will be remain as standby only during any switchover activity and can be activated only if Primary & Near DR cannot be available due to any disaster.
Summary of Activities
We will follow below order to configure cascade standby:
Near DR configuration from using Primary
Step 1: Verify Connectivity Between Primary and Standby
This is a three-server chain rather than a single primary-to-standby pair, so confirm the network path works in every direction that matters before configuring anything: primary to Near DR, since that's where the initial RMAN Duplicate pulls from; Near DR to Far DR, since that's the cascaded redo path and the second RMAN Duplicate; and primary to Far DR, so that direct path is available if it's ever needed during a disaster. Catching a routing or firewall gap now is far easier than debugging it mid-duplicate.
Primary:
[oracle@orcldc ~]$ hostname
orcldc.oraeasy.com
[oracle@orcldc ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
##DC##
192.168.80.51 orcldc.oraeasy.com orcldc
##NEAR DR##
192.168.80.61 orclndr.oraeasy.com orclndr
##FAR DR##
192.168.80.71 orclfdr.oraeasy.com orclfdr
[oracle@orcldc ~]$ ping -c 4 orclndr.oraeasy.com
PING orclndr.oraeasy.com (192.168.80.61) 56(84) bytes of data.
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=1 ttl=64 time=0.881 ms
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=2 ttl=64 time=1.11 ms
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=3 ttl=64 time=1.01 ms
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=4 ttl=64 time=0.824 ms
--- orclndr.oraeasy.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3072ms
rtt min/avg/max/mdev = 0.824/0.954/1.107/0.110 ms
[oracle@orcldc ~]$
[oracle@orcldc ~]$ ping -c 4 orclfdr.oraeasy.com
PING orclfdr.oraeasy.com (192.168.80.71) 56(84) bytes of data.
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=1 ttl=64 time=1.18 ms
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=2 ttl=64 time=0.604 ms
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=3 ttl=64 time=0.839 ms
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=4 ttl=64 time=0.736 ms
Near DR:
[oracle@orclndr ~]$ hostname
orclndr.oraeasy.com
[oracle@orclndr ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
##DC##
192.168.80.51 orcldc.oraeasy.com orcldc
##NEAR DR##
192.168.80.61 orclndr.oraeasy.com orclndr
##FAR DR##
192.168.80.71 orclfdr.oraeasy.com orclfdr
[oracle@orclndr ~]$ ping -c 4 orcldc.oraeasy.com
PING orcldc.oraeasy.com (192.168.80.51) 56(84) bytes of data.
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=1 ttl=64 time=0.527 ms
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=2 ttl=64 time=0.804 ms
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=3 ttl=64 time=0.400 ms
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=4 ttl=64 time=1.10 ms
--- orcldc.oraeasy.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3109ms
rtt min/avg/max/mdev = 0.400/0.706/1.096/0.268 ms
[oracle@orclndr ~]$
[oracle@orclndr ~]$ ping -c 4 orclfdr.oraeasy.com
PING orclfdr.oraeasy.com (192.168.80.71) 56(84) bytes of data.
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=1 ttl=64 time=2.02 ms
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=2 ttl=64 time=0.963 ms
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=3 ttl=64 time=0.756 ms
64 bytes from orclfdr.oraeasy.com (192.168.80.71): icmp_seq=4 ttl=64 time=0.445 ms
--- orclfdr.oraeasy.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3093ms
rtt min/avg/max/mdev = 0.445/1.046/2.022/0.592 ms
[oracle@orclndr ~]$
Far DR:
[oracle@orclfdr ~]$ hostname
orclfdr.oraeasy.com
[oracle@orclfdr ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
##DC##
192.168.80.51 orcldc.oraeasy.com orcldc
##NEAR DR##
192.168.80.61 orclndr.oraeasy.com orclndr
##FAR DR##
192.168.80.71 orclfdr.oraeasy.com orclfdr
[oracle@orclfdr ~]$
[oracle@orclfdr ~]$ ping -c 4 orcldc.oraeasy.com
PING orcldc.oraeasy.com (192.168.80.51) 56(84) bytes of data.
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=1 ttl=64 time=0.420 ms
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=2 ttl=64 time=1.15 ms
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=3 ttl=64 time=1.14 ms
64 bytes from orcldc.oraeasy.com (192.168.80.51): icmp_seq=4 ttl=64 time=0.936 ms
--- orcldc.oraeasy.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3026ms
rtt min/avg/max/mdev = 0.420/0.911/1.149/0.296 ms
[oracle@orclfdr ~]$
[oracle@orclfdr ~]$
[oracle@orclfdr ~]$ ping -c 4 orclndr.oraeasy.com
PING orclndr.oraeasy.com (192.168.80.61) 56(84) bytes of data.
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=1 ttl=64 time=0.754 ms
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=2 ttl=64 time=1.26 ms
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=3 ttl=64 time=1.21 ms
64 bytes from orclndr.oraeasy.com (192.168.80.61): icmp_seq=4 ttl=64 time=1.24 ms
--- orclndr.oraeasy.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3014ms
rtt min/avg/max/mdev = 0.754/1.116/1.260/0.210 ms
[oracle@orclfdr ~]$
Step 2: Configure the Primary Database for Data Guard
Before proceeding, the primary needs the standard Data Guard prerequisites in place: force logging, ARCHIVELOG mode, and the various redo transport parameters. Start by checking the current state.
SQL> def
DEFINE _DATE = "28-JUL-26" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orcldc" (CHAR)
DEFINE _USER = "SYS" (CHAR)
DEFINE _PRIVILEGE = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "2326010000" (CHAR)
DEFINE _EDITOR = "vi" (CHAR)
DEFINE _O_VERSION = "Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0" (CHAR)
DEFINE _O_RELEASE = "2326010000" (CHAR)
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL>
SQL> set lines 200 pages 1000
SQL> col open_mode for a15
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ---------------- ---------------- --------------------
ORCL ORCLDC PRIMARY READ WRITE
SQL> select banner_full from v$version;
BANNER_FULL
-------------------------------------------------------------------------------
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
SQL> col name for a70
SQL> select file#, name from v$datafile;
FILE# NAME
---------- ----------------------------------------------------------------------
1 /u01/app/oracle/oradata/ORCL/system01.dbf
2 /u01/app/oracle/oradata/ORCL/pdbseed/system01.dbf
3 /u01/app/oracle/oradata/ORCL/sysaux01.dbf
4 /u01/app/oracle/oradata/ORCL/pdbseed/sysaux01.dbf
7 /u01/app/oracle/oradata/ORCL/users01.dbf
9 /u01/app/oracle/oradata/ORCL/pdbseed/undotbs01.dbf
11 /u01/app/oracle/oradata/ORCL/undotbs01.dbf
12 /u01/app/oracle/oradata/ORCL/orclpdb1/system01.dbf
13 /u01/app/oracle/oradata/ORCL/orclpdb1/sysaux01.dbf
14 /u01/app/oracle/oradata/ORCL/orclpdb1/undotbs01.dbf
15 /u01/app/oracle/oradata/ORCL/orclpdb1/users01.dbf
11 rows selected.
SQL> select name from v$controlfile;
NAME
----------------------------------------------------------------------
/u01/app/oracle/oradata/ORCL/control01.ctl
/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl
SQL> col MEMBER for a40
SQL> select group#, type, MEMBER from v$logfile order by group#;
GROUP# TYPE MEMBER
---------- ------- ----------------------------------------
1 ONLINE /u01/app/oracle/oradata/ORCL/redo01.log
2 ONLINE /u01/app/oracle/oradata/ORCL/redo02.log
3 ONLINE /u01/app/oracle/oradata/ORCL/redo03.log
If your database is in NOARCHIVELOG mode, switch it first:
ALTER SYSTEM SET db_recovery_file_dest='/u01/app/oracle/fast_recovery_area' SCOPE=BOTH;
ALTER SYSTEM SET db_recovery_file_dest_size=50G SCOPE=BOTH;
SHUT IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
Now make the Data Guard-specific changes on the primary:
SQL> SELECT name, force_logging, log_mode FROM v$database;
NAME FORCE_LOGGING LOG_MODE
----------- ----------------- ------------
ORCL NO ARCHIVELOG
SQL> ALTER DATABASE FORCE LOGGING;
Database altered.
SQL> SELECT name, force_logging, log_mode FROM v$database;
NAME FORCE_LOGGING LOG_MODE
----------- ----------------- ------------
ORCL YES ARCHIVELOG
SQL> SHOW PARAMETER db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orcl
SQL> SHOW PARAMETER db_unique_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string ORCLDC
SQL> SHOW PARAMETER LOG_ARCHIVE_CONFIG
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string
SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(ORCLDC,ORCLNDR,ORCLFDR)';
System altered.
SQL> SHOW PARAMETER LOG_ARCHIVE_CONFIG
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(ORCLDC,ORCLNDR,ORCL
FDR)
SQL> show parameter LOG_ARCHIVE_DEST_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string
Configure redo transport from the Primary database to the Intermediate standby (Near DR):
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=ORCLNDR NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCLNDR';
System altered.
SQL> show parameter LOG_ARCHIVE_DEST_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=ORCLNDR NOAFFIRM ASYNC
VALID_FOR=(ONLINE_LOGFILES,PR
IMARY_ROLE) DB_UNIQUE_NAME=ORC
LNDR
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string
SQL>
SQL> show parameter LOG_ARCHIVE_DEST_3
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_3 string
log_archive_dest_30 string
log_archive_dest_31 string
Preconfigure redo transport the Primary database to the second Standby (FAR DR):
This destination becomes active only after a role transition (switchover/failover):
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='SERVICE=ORCLFDR NOAFFIRM ASYNC VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=ORCLFDR';
System altered.
SQL> show parameter LOG_ARCHIVE_DEST_STATE_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------------
log_archive_dest_3 string SERVICE=ORCLFDR NOAFFIRM ASYNC
VALID_FOR=(STANDBY_LOGFILES,
STANDBY_ROLE) DB_UNIQUE_NAME=ORCLFDR'
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
SQL> show parameter LOG_ARCHIVE_DEST_STATE_3
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_3 string enable
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
Keep the downstream redo destination disabled until it is required:
SQL> alter system set log_archive_dest_state_3=DEFER;
System altered.
SQL> show parameter LOG_ARCHIVE_DEST_STATE_3
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_3 string DEFER
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
SQL> SHOW PARAMETER LOG_ARCHIVE_FORMAT
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.dbf
SQL> ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='%t_%s_%r.arc' SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=30;
System altered.
SQL> ALTER SYSTEM SET REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SCOPE=SPFILE;
System altered.
SQL> ALTER SYSTEM SET FAL_SERVER=ORCLNDR;
System altered.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
System altered.
SQL> ALTER SYSTEM SET archive_lag_target=900;
System altered.
SQL>
Set DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT so file paths convert automatically between primary and standby, this matters since the two servers use different directory names here. Here we put parameter so that it can be converted between Primary & Near DR (ORCLDC vs. ORCLNDR).
SQL> ALTER SYSTEM SET DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/ORCLNDR','/u01/app/oracle/oradata/ORCL';
System altered.
SQL> ALTER SYSTEM SET LOG_FILE_NAME_CONVERT='/u01/app/oracle/oradata/ORCLNDR','/u01/app/oracle/oradata/ORCL';
System altered.
Several parameters above used SCOPE=SPFILE, so bounce the database to apply them all.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1406373344 bytes
Fixed Size 5008864 bytes
Variable Size 536870912 bytes
Database Buffers 855638016 bytes
Redo Buffers 8855552 bytes
Database mounted.
Database opened.
SQL>
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL>
SQL> SHOW PARAMETER LOG_ARCHIVE_FORMAT
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.arc
SQL>
SQL> show parameter REMOTE_LOGIN_PASSWORDFILE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
Finally, add standby redo logs. These are used once this database's role switches to standby, so they need to exist now even though this server is currently the primary. The number of standby redo log groups should be one more than the number of online redo log groups.
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/ORCL/standby_redo01.log') SIZE 200M;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/ORCL/standby_redo02.log') SIZE 200M;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/ORCL/standby_redo03.log') SIZE 200M;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE ('/u01/app/oracle/oradata/ORCL/standby_redo04.log') SIZE 200M;
Database altered.
SQL> col MEMBER for a50
SQL> SELECT group#, type, member FROM v$logfile ORDER BY group#;
GROUP# TYPE MEMBER
---------- ------- --------------------------------------------------
1 ONLINE /u01/app/oracle/oradata/ORCL/redo01.log
2 ONLINE /u01/app/oracle/oradata/ORCL/redo02.log
3 ONLINE /u01/app/oracle/oradata/ORCL/redo03.log
4 STANDBY /u01/app/oracle/oradata/ORCL/standby_redo01.log
5 STANDBY /u01/app/oracle/oradata/ORCL/standby_redo02.log
6 STANDBY /u01/app/oracle/oradata/ORCL/standby_redo03.log
7 STANDBY /u01/app/oracle/oradata/ORCL/standby_redo04.log
7 rows selected.
SQL>
Step 3: Set Up TNS on the Primary
Each server needs to resolve the other two by their TNS aliases, since RMAN Duplicate connects to the source database over the network using these names rather than working from a local file copy.
[oracle@orcldc ~]$ cd $ORACLE_HOME/network/admin
[oracle@orcldc admin]$
[oracle@orcldc admin]$ cat tnsnames.ora
ORCLDC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcldc.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcldc)
)
)
ORCLNDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclndr.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orclndr)
)
)
ORCLFDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclfdr.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orclfdr)
)
)
Step 4: Create the Pfile
This pfile will be used on standby to start the instance post modification.
SQL> create pfile='/home/oracle/initorcldc.ora' from spfile;
File created.
Step 5: Transfer the Pfile and Password File to the Standby
Near DR needs both files present locally before it can start an instance: the pfile to boot into nomount mode, and the password file so RMAN can authenticate against it as the auxiliary database over the network.
[oracle@orcldc ~]$ scp initorcldc.ora oracle@orclndr.oraeasy.com:/home/oracle
The authenticity of host 'orclndr.oraeasy.com (192.168.80.61)' can't be established.
ED25519 key fingerprint is SHA256:2CH2fx4xpcQBVTKO/W+6utc3T81pa7JcFmKngApPvDs.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? Yes
Warning: Permanently added 'orclndr.oraeasy.com' (ED25519) to the list of known hosts.
oracle@orclndr.oraeasy.com's password:
initorcldc.ora 100% 1831 54.0KB/s 00:00
[oracle@orcldc ~]$
[oracle@orcldc ~]$ scp /u01/app/oracle/26ai/db_1/dbs/orapworcldc oracle@orclndr.oraeasy.com:/u01/app/oracle/26ai/db_1/dbs/orapworclndr
oracle@orclndr.oraeasy.com's password:
orapworcldc 100% 2048 107.2KB/s 00:00
[oracle@orcldc ~]$
Step 6: Create the Standby Pfile
Modify a copy of the primary's pfile for the standby, adjusting the paths, unique name, and redo transport direction. Below are the key parameters that differ:
*.control_files='/u01/app/oracle/oradata/ORCLNDR/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCLNDR/control02.ctl'
*.db_file_name_convert='/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLNDR'
*.db_unique_name='ORCLNDR'
*.log_file_name_convert='/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLNDR'
*.fal_server='ORCLDC'
Configure redo transport from the Near DR to the Primary database after a role transition:
*.log_archive_dest_2='SERVICE=ORCLDC NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCLDC'
Keep redo transport to the Primary database disabled until the Near DR becomes the Primary during a switchover or failover:
*.log_archive_dest_state_2='DEFER'
Configure redo transport from the Near DR to the Far DR:
*.log_archive_dest_3='SERVICE=ORCLFDR NOAFFIRM ASYNC VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=ORCLFDR'
Enable redo transport from the Near DR to the Far DR for cascaded redo forwarding:
*.log_archive_dest_state_3='ENABLE'
Here's the full initorclndr.ora with these changes applied:
orclndr.__data_transfer_cache_size=0
orclndr.__datamemory_area_size=0
orclndr.__db_cache_size=788529152
orclndr.__inmemory_ext_roarea=0
orclndr.__inmemory_ext_rwarea=0
orclndr.__java_pool_size=0
orclndr.__large_pool_size=16777216
orclndr.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orclndr.__pga_aggregate_target=469762048
orclndr.__sga_target=1409286144
orclndr.__shared_io_pool_size=67108864
orclndr.__shared_pool_size=503316480
orclndr.__streams_pool_size=0
orclndr.__unified_pga_pool_size=0
orclndr._instance_recovery_bloom_filter_size=1048576
*.archive_lag_target=900
*.compatible='23.6.0'
*.control_files='/u01/app/oracle/oradata/ORCLNDR/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCLNDR/control02.ctl'
*.db_block_size=8192
*.db_file_name_convert='/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLNDR'
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=14802m
*.db_unique_name='ORCLNDR'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcldcXDB)'
*.enable_pluggable_database=true
*.fal_server='ORCLDC'
*.log_archive_config='DG_CONFIG=(ORCLDC,ORCLNDR,ORCLFDR)'
*.log_archive_dest_2='SERVICE=ORCLDC NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCLDC'
*.log_archive_dest_3='SERVICE=ORCLFDR NOAFFIRM ASYNC VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=ORCLFDR'
*.log_archive_dest_state_2='DEFER'
*.log_archive_dest_state_3='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.log_file_name_convert='/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLNDR'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=446m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1338m
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
Step 7: Create the Required Directories
RMAN Duplicate restores datafiles directly into these paths rather than creating the directory structure itself, so they need to exist on Near DR beforehand, including separate directories for the pluggable database and the PDB seed since this is a multitenant database.
[oracle@orclndr ~]$ mkdir -p /u01/app/oracle/oradata/ORCLNDR/
[oracle@orclndr ~]$ mkdir -p /u01/app/oracle/fast_recovery_area/ORCLNDR
[oracle@orclndr ~]$ mkdir -p /u01/app/oracle/oradata/ORCLNDR/orclpdb1
[oracle@orclndr ~]$ mkdir -p /u01/app/oracle/oradata/ORCLNDR/pdbseed
Step 8: Network Configuration
Next, create a listener using NETCA, start it, and add TNS entries for both the primary and standby services. If you haven't set up a listener before, see our Listener Creation Using NETCA guide.
[oracle@orclndr ~]$ cd /u01/app/oracle/26ai/db_1/network/admin/
[oracle@orclndr admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclndr.oraeasy.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC = (GLOBAL_DBNAME = orclndr)
(ORACLE_HOME = /u01/app/oracle/26ai/db_1)
(SID_NAME = orclndr)
)
)
[oracle@orclndr admin]$ . oraenv
ORACLE_SID = [oracle] ? orclndr
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/26ai/db_1
The Oracle base has been set to /u01/app/oracle
[oracle@orclndr admin]$ lsnrctl start LISTENER
LSNRCTL for Linux: Version 23.26.1.0.0 - Production on 28-JUL-2026 13:35:09
Copyright (c) 1991, 2026, Oracle. All rights reserved.
Starting /u01/app/oracle/26ai/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 23.26.1.0.0 - Production
System parameter file is /u01/app/oracle/26ai/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/orclndr/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orclndr.oraeasy.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orclndr.oraeasy.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 23.26.1.0.0 - Production
Start Date 28-JUL-2026 13:35:10
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/26ai/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/orclndr/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orclndr.oraeasy.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orclndr" has 1 instance(s).
Instance "orclndr", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@orclndr admin]$ cat tnsnames.ora
ORCLDC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcldc.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcldc)
)
)
ORCLNDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclndr.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orclndr)
)
)
ORCLFDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclfdr.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orclfdr)
)
)
Step 9: Start the Near DR Instance in Nomount Mode
RMAN needs a running instance to connect to as the auxiliary database before it can restore a standby control file, so start Near DR in nomount mode using the pfile prepared in Step 6.
[oracle@orclndr ~]$ . oraenv
ORACLE_SID = [orclndr] ?
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/26ai/db_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@orclndr ~]$
[oracle@orclndr ~]$ pwd
/home/oracle
[oracle@orclndr ~]$ ls
Desktop Documents Downloads initorcldc.ora initorcndr.ora Music Pictures Public software Templates Videos
[oracle@orclndr ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Tue Jul 28 13:18:29 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to an idle instance.
SQL> def
DEFINE _DATE = "28-JUL-26" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orclndr" (CHAR)
DEFINE _USER = "SYS" (CHAR)
DEFINE _PRIVILEGE = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "2326010000" (CHAR)
DEFINE _EDITOR = "vi" (CHAR)
DEFINE _O_VERSION = "" (CHAR)
DEFINE _O_RELEASE = "" (CHAR)
SQL> startup nomount pfile='/home/oracle/initorclndr.ora';
ORACLE instance started.
Total System Global Area 1406373344 bytes
Fixed Size 5008864 bytes
Variable Size 536870912 bytes
Database Buffers 855638016 bytes
Redo Buffers 8855552 bytes
SQL>
Step 10: Connect RMAN to the Primary and Near DR
The primary is connected as the target, using its TNS alias, and the Near DR is connected as the auxiliary, using its own TNS alias.
[oracle@orclndr ~]$ rman target sys/sys@orcldc auxiliary sys/sys@orclndr
Recovery Manager: Release 23.26.1.0.0 - Production on Tue Jul 28 13:35:55 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2026, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1766239965)
connected to auxiliary database: ORCL (not mounted)
RMAN>
Step 11: Run the RMAN Duplicate for Standby Script
This is the core step. DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE combines what would otherwise be several manual steps, backing up the password file, restoring a standby control file, restoring datafiles, and switching them into place, into one command. Because this database was already prepared with the Data Guard parameters in Step 2, RMAN automatically restores a proper standby control file rather than a regular one.
RMAN> duplicate target database for standby from active database;
duplicate target database for standby from active database;
Starting Duplicate Db at 28-JUL-26
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=40 device type=DISK
contents of Memory Script:
{
backup as copy reuse
passwordfile auxiliary format '/u01/app/oracle/26ai/db_1/dbs/orapworclndr' ;
}
executing Memory Script
Starting backup at 28-JUL-26
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=69 device type=DISK
Finished backup at 28-JUL-26
contents of Memory Script:
{
restore clone from service 'orcldc' standby controlfile;
}
executing Memory Script
Starting restore at 28-JUL-26
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
output file name=/u01/app/oracle/oradata/ORCLNDR/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/ORCLNDR/control02.ctl
Finished restore at 28-JUL-26
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/ORCLNDR/temp01.dbf";
set newname for tempfile 2 to
"/u01/app/oracle/oradata/ORCLNDR/pdbseed/temp01.dbf";
set newname for tempfile 3 to
"/u01/app/oracle/oradata/ORCLNDR/orclpdb1/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/ORCLNDR/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/ORCLNDR/pdbseed/system01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/ORCLNDR/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/ORCLNDR/pdbseed/sysaux01.dbf";
set newname for datafile 7 to
"/u01/app/oracle/oradata/ORCLNDR/users01.dbf";
set newname for datafile 9 to
"/u01/app/oracle/oradata/ORCLNDR/pdbseed/undotbs01.dbf";
set newname for datafile 11 to
"/u01/app/oracle/oradata/ORCLNDR/undotbs01.dbf";
set newname for datafile 12 to
"/u01/app/oracle/oradata/ORCLNDR/orclpdb1/system01.dbf";
set newname for datafile 13 to
"/u01/app/oracle/oradata/ORCLNDR/orclpdb1/sysaux01.dbf";
set newname for datafile 14 to
"/u01/app/oracle/oradata/ORCLNDR/orclpdb1/undotbs01.dbf";
set newname for datafile 15 to
"/u01/app/oracle/oradata/ORCLNDR/orclpdb1/users01.dbf";
restore
from nonsparse from service
'orcldc' clone database
;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/ORCLNDR/temp01.dbf in control file
renamed tempfile 2 to /u01/app/oracle/oradata/ORCLNDR/pdbseed/temp01.dbf in control file
renamed tempfile 3 to /u01/app/oracle/oradata/ORCLNDR/orclpdb1/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 28-JUL-26
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORCLNDR/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:48
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/ORCLNDR/pdbseed/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:52
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCLNDR/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORCLNDR/pdbseed/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:56
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/ORCLNDR/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:18
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/ORCLNDR/pdbseed/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:12
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/ORCLNDR/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:09
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/ORCLNDR/orclpdb1/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:55
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00013 to /u01/app/oracle/oradata/ORCLNDR/orclpdb1/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00014 to /u01/app/oracle/oradata/ORCLNDR/orclpdb1/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcldc
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00015 to /u01/app/oracle/oradata/ORCLNDR/orclpdb1/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 28-JUL-26
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=1 STAMP=1239803273 file name=/u01/app/oracle/oradata/ORCLNDR/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=1239803273 file name=/u01/app/oracle/oradata/ORCLNDR/pdbseed/system01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=1239803273 file name=/u01/app/oracle/oradata/ORCLNDR/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=1239803274 file name=/u01/app/oracle/oradata/ORCLNDR/pdbseed/sysaux01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=5 STAMP=1239803274 file name=/u01/app/oracle/oradata/ORCLNDR/users01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=6 STAMP=1239803274 file name=/u01/app/oracle/oradata/ORCLNDR/pdbseed/undotbs01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=7 STAMP=1239803274 file name=/u01/app/oracle/oradata/ORCLNDR/undotbs01.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=8 STAMP=1239803274 file name=/u01/app/oracle/oradata/ORCLNDR/orclpdb1/system01.dbf
datafile 13 switched to datafile copy
input datafile copy RECID=9 STAMP=1239803275 file name=/u01/app/oracle/oradata/ORCLNDR/orclpdb1/sysaux01.dbf
datafile 14 switched to datafile copy
input datafile copy RECID=10 STAMP=1239803275 file name=/u01/app/oracle/oradata/ORCLNDR/orclpdb1/undotbs01.dbf
datafile 15 switched to datafile copy
input datafile copy RECID=11 STAMP=1239803275 file name=/u01/app/oracle/oradata/ORCLNDR/orclpdb1/users01.dbf
Finished Duplicate Db at 28-JUL-26
RMAN>
Step 12: Start Real-Time Apply
Enable log shipment on the primary:
SQL> alter system set log_archive_dest_state_2= ENABLE scope=both;
System altered.
SQL> show parameter log_archive_dest_state_2;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
log_archive_dest_state_20 string enable
log_archive_dest_state_21 string enable
log_archive_dest_state_22 string enable
log_archive_dest_state_23 string enable
log_archive_dest_state_24 string enable
log_archive_dest_state_25 string enable
log_archive_dest_state_26 string enable
log_archive_dest_state_27 string enable
log_archive_dest_state_28 string enable
log_archive_dest_state_29 string enable
SQL> set lines 200 pages 1000
SQL> col DEST_NAME for a20
SQL> col DESTINATION for a20
SQL> col error for a30
SQL> select DEST_ID, DEST_NAME, STATUS, ERROR from v$archive_dest where DEST_NAME='LOG_ARCHIVE_DEST_2';
DEST_ID DEST_NAME STATUS ERROR
------- -------------------- --------- ------------------------------
2 LOG_ARCHIVE_DEST_2 VALID
Start apply at the standby:
[oracle@orclndr ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Tue Jul 28 13:51:37 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED MOUNTED
3 ORCLPDB1 MOUNTED
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ----------------- ---------------- -------------
ORCL ORCLNDR PHYSICAL STANDBY MOUNTED
SQL>
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select process,status,thread#,sequence#,block# from v$managed_standby where process like '%MRP%';
PROCESS STATUS THREAD# SEQUENCE# BLOCK#
--------- -------------------- ---------- ---------- ----------
MRP0 APPLYING_LOG 1 12 20129
SQL> /
PROCESS STATUS THREAD# SEQUENCE# BLOCK#
--------- -------------------- ---------- ---------- ----------
MRP0 APPLYING_LOG 1 13 55
SQL>
Switch a few logs on the primary and check the sync:
On Primary:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> set lines 200 pages 300
SQL> alter session set nls_date_format= 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select d.db_unique_name, a.thread#, b.last_seq, a.applied_seq, a.last_app_timestamp, b.last_seq - a.applied_seq ARC_DIFF
FROM
(select thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp from gv$archived_log where applied='YES' group by thread#) a,
(select thread#, MAX(sequence#) last_seq from gv$archived_log group by thread#) b,
(select db_unique_name from v$database) d where a.thread#=b.thread#;
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ LAST_APP_TIMESTAMP ARC_DIFF
------------------------------ ---------------- ---------- ---------- ----------- -------------------- ----------
ORCLDC PRIMARY 1 31 30 28-JUL-2026 18:30:58 1
On Near DR:
SQL> select d.db_unique_name, a.thread#, b.last_seq, a.applied_seq, b.last_seq - a.applied_seq ARC_DIFF, a.last_app_timestamp,
round((sysdate - a.last_app_timestamp)*24*60,2) Gap_in_Mins, round((sysdate - a.last_app_timestamp)*24*60*60,2) Gap_in_Seconds
FROM
(select thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp from v$archived_log where REGISTRAR='RFS' and applied='YES' group by thread#) a,
(select thread#, MAX(sequence#) last_seq from gv$archived_log group by thread#) b,
(select db_unique_name from v$database) d where a.thread#=b.thread#;
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ ARC_DIFF LAST_APP_TIMESTAMP GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLNDR PHYSICAL STANDBY 1 31 28 3 28-JUL-2026 18:23:30 11.32 679
SQL> /
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ ARC_DIFF LAST_APP_TIMESTAMP GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLNDR PHYSICAL STANDBY 1 31 31 0 28-JUL-2026 18:31:01 13.9 834
ARC_DIFF shows 0, confirming the standby is fully synced.
Now we have completed the Near DR configuration. So let's proceed for Far DR confguration.
Far DR configuration from using Near DR
Step 1: Transfer the Pfile and Password File to the Far DR from Near DR
Far DR is duplicated from Near DR rather than directly from the primary, since that's the whole point of a cascaded configuration, so the pfile and password file it needs come from Near DR at this point, not from the primary server.
[oracle@orclndr ~]$ scp initorclndr.ora oracle@orclfdr.oraeasy.com:/home/oracle
The authenticity of host 'orclfdr.oraeasy.com (192.168.80.71)' can't be established.
ED25519 key fingerprint is SHA256:2CH2fx4xpcQBVTKO/W+6utc3T81pa7JcFmKngApPvDs.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'orclfdr.oraeasy.com' (ED25519) to the list of known hosts.
oracle@orclfdr.oraeasy.com's password:
initorclndr.ora 100% 1885 87.4KB/s 00:00
[oracle@orclndr ~]$
[oracle@orclndr ~]$ scp /u01/app/oracle/26ai/db_1/dbs/orapworclndr oracle@orclfdr.oraeasy.com:/u01/app/oracle/26ai/db_1/dbs/orapworclfdr
oracle@orclfdr.oraeasy.com's password:
orapworclndr 100% 2048 833.4KB/s 00:00
[oracle@orclndr ~]$
Step 2: Create the Far DR Pfile
Modify a copy of the Near DR's pfile for the Far DR, adjusting the paths, unique name, and redo transport direction. Below are the key parameters that differ:
*.control_files='/u01/app/oracle/oradata/ORCLFDR/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCLFDR/control02.ctl'
*.db_unique_name='ORCLFDR'
*.fal_server='ORCLNDR'
Here we will not set any remote archive destination, as this DR will not be transferring archive to any destination. Also, parameters like file path conversion will be taken care of during the RMAN Duplicate script itself, just to avoid any ambiguity with the Primary.
Here's the full initorclfdr.ora with these changes applied:
orclfdr.__data_transfer_cache_size=0
orclfdr.__datamemory_area_size=0
orclfdr.__db_cache_size=788529152
orclfdr.__inmemory_ext_roarea=0
orclfdr.__inmemory_ext_rwarea=0
orclfdr.__java_pool_size=0
orclfdr.__large_pool_size=16777216
orclfdr.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orclfdr.__pga_aggregate_target=469762048
orclfdr.__sga_target=1409286144
orclfdr.__shared_io_pool_size=67108864
orclfdr.__shared_pool_size=503316480
orclfdr.__streams_pool_size=0
orclfdr.__unified_pga_pool_size=0
orclfdr._instance_recovery_bloom_filter_size=1048576
*.archive_lag_target=900
*.compatible='23.6.0'
*.control_files='/u01/app/oracle/oradata/ORCLFDR/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCLFDR/control02.ctl'
*.db_block_size=8192
*.db_name='orcl'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=14802m
*.db_unique_name='ORCLFDR'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcldcXDB)'
*.enable_pluggable_database=true
*.fal_server='ORCLNDR'
*.log_archive_config='DG_CONFIG=(ORCLDC,ORCLNDR,ORCLFDR)'
*.log_archive_dest_state_2='DEFER'
*.log_archive_dest_state_3='DEFER'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=30
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=446m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1338m
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
Step 3: Create the Required Directories
As with Near DR, these paths need to exist before RMAN Duplicate runs, since it restores datafiles straight into them rather than creating the directory structure on its own.
[oracle@orclfdr ~]$ mkdir -p /u01/app/oracle/oradata/ORCLFDR/
[oracle@orclfdr ~]$ mkdir -p /u01/app/oracle/fast_recovery_area/ORCLFDR
[oracle@orclfdr ~]$ mkdir -p /u01/app/oracle/oradata/ORCLFDR/orclpdb1
[oracle@orclfdr ~]$ mkdir -p /u01/app/oracle/oradata/ORCLFDR/pdbseed
Step 4: Network Configuration
Next, create a listener using NETCA, start it, and add TNS entries for both the primary and standby services. If you haven't set up a listener before, see our Listener Creation Using NETCA guide.
[oracle@orclfdr ~]$ cd /u01/app/oracle/26ai/db_1/network/admin/
[oracle@orclfdr admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclfdr.oraeasy.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC = (GLOBAL_DBNAME = orclfdr)
(ORACLE_HOME = /u01/app/oracle/26ai/db_1)
(SID_NAME = orclfdr)
)
)
[oracle@orclfdr admin]$
[oracle@orclfdr admin]$ . oraenv
ORACLE_SID = [oracle] ? orclfdr
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/26ai/db_1
The Oracle base has been set to /u01/app/oracle
[oracle@orclfdr admin]$
[oracle@orclfdr admin]$ lsnrctl start
LSNRCTL for Linux: Version 23.26.1.0.0 - Production on 28-JUL-2026 15:45:48
Copyright (c) 1991, 2026, Oracle. All rights reserved.
Starting /u01/app/oracle/26ai/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 23.26.1.0.0 - Production
System parameter file is /u01/app/oracle/26ai/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/orclfdr/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orclfdr.oraeasy.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orclfdr.oraeasy.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 23.26.1.0.0 - Production
Start Date 28-JUL-2026 15:45:49
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/26ai/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/orclfdr/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orclfdr.oraeasy.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orclfdr" has 1 instance(s).
Instance "orclfdr", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@orclfdr admin]$
[oracle@orclfdr admin]$ cat tnsnames.ora
ORCLDC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcldc.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcldc)
)
)
ORCLNDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclndr.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orclndr)
)
)
ORCLFDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orclfdr.oraeasy.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orclfdr)
)
)
[oracle@orclfdr admin]$
Step 5: Start the Far DR Instance in Nomount Mode
As with Near DR earlier, start the instance in nomount mode so RMAN has something to connect to as the auxiliary database once we run the duplicate script.
[oracle@orclfdr ~]$ . oraenv
ORACLE_SID = [orclfdr] ? orclfdr
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/26ai/db_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@orclfdr ~]$
[oracle@orclfdr ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Tue Jul 28 15:48:05 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to an idle instance.
SQL> def
DEFINE _DATE = "28-JUL-26" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "orclfdr" (CHAR)
DEFINE _USER = "SYS" (CHAR)
DEFINE _PRIVILEGE = "AS SYSDBA" (CHAR)
DEFINE _SQLPLUS_RELEASE = "2326010000" (CHAR)
DEFINE _EDITOR = "vi" (CHAR)
DEFINE _O_VERSION = "" (CHAR)
DEFINE _O_RELEASE = "" (CHAR)
SQL> startup nomount pfile='/home/oracle/initorclfdr.ora';
ORACLE instance started.
Total System Global Area 1406373344 bytes
Fixed Size 5008864 bytes
Variable Size 536870912 bytes
Database Buffers 855638016 bytes
Redo Buffers 8855552 bytes
SQL>
Step 6: Connect RMAN to the Near DR and Far DR
The Near DR is connected as the target, using its TNS alias, and the Far DR is connected as the auxiliary, using its own TNS alias.
[oracle@orclfdr ~]$ rman target sys/sys@orclndr auxiliary sys/sys@orclfdr
Recovery Manager: Release 23.26.1.0.0 - Production on Tue Jul 28 16:54:29 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2026, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1766239965, not open)
connected to auxiliary database: ORCL (not mounted)
RMAN>
Step 7: Run the RMAN Duplicate for Standby Script
This duplicate looks different from the one used for Near DR. Rather than relying on a pre-edited pfile, this version passes the differing parameters directly in the RMAN script itself, using PARAMETER_VALUE_CONVERT and individual SET clauses, and adds NOFILENAMECHECK since the datafile paths on Near DR and Far DR only differ by the unique name substitution. Both approaches work; this one keeps everything in a single script rather than splitting the parameter changes into a separate pfile edit.
RMAN> RUN {
DUPLICATE TARGET DATABASE
FOR STANDBY
FROM ACTIVE DATABASE
SPFILE
PARAMETER_VALUE_CONVERT 'ORCLNDR','ORCLFDR'
SET db_unique_name='ORCLFDR'
SET db_file_name_convert='/u01/app/oracle/oradata/ORCLNDR','/u01/app/oracle/oradata/ORCLFDR','/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLFDR'
SET log_file_name_convert='/u01/app/oracle/oradata/ORCLNDR','/u01/app/oracle/oradata/ORCLFDR','/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLFDR'
SET fal_server='ORCLNDR'
SET standby_file_management='MANUAL'
NOFILENAMECHECK;
}
RUN {
2> DUPLICATE TARGET DATABASE
3> FOR STANDBY
4> FROM ACTIVE DATABASE
5> SPFILE
6> PARAMETER_VALUE_CONVERT 'ORCLNDR','ORCLFDR'
7> SET db_unique_name='ORCLFDR'
8> SET db_file_name_convert='/u01/app/oracle/oradata/ORCLNDR','/u01/app/oracle/oradata/ORCLFDR','/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLFDR'
9> SET log_file_name_convert='/u01/app/oracle/oradata/ORCLNDR','/u01/app/oracle/oradata/ORCLFDR','/u01/app/oracle/oradata/ORCL','/u01/app/oracle/oradata/ORCLFDR'
10> SET fal_server='ORCLNDR'
11> SET standby_file_management='MANUAL'
12> NOFILENAMECHECK;
13>
}
Starting Duplicate Db at 28-JUL-26
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=41 device type=DISK
contents of Memory Script:
{
backup as copy reuse
passwordfile auxiliary format '/u01/app/oracle/26ai/db_1/dbs/orapworclfdr' ;
restore clone from service 'orclndr' spfile to
'/u01/app/oracle/26ai/db_1/dbs/spfileorclfdr.ora';
sql clone "alter system set spfile= ''/u01/app/oracle/26ai/db_1/dbs/spfileorclfdr.ora''";
}
executing Memory Script
Starting backup at 28-JUL-26
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
Finished backup at 28-JUL-26
Starting restore at 28-JUL-26
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: restoring SPFILE
output file name=/u01/app/oracle/26ai/db_1/dbs/spfileorclfdr.ora
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
Finished restore at 28-JUL-26
sql statement: alter system set spfile= ''/u01/app/oracle/26ai/db_1/dbs/spfileorclfdr.ora''
contents of Memory Script:
{
sql clone "alter system set control_files =
''/u01/app/oracle/oradata/ORCLFDR/control01.ctl'', ''/u01/app/oracle/fast_recovery_area/ORCLFDR/control02.ctl'' comment=
'''' scope=spfile";
sql clone "alter system set db_unique_name =
''ORCLFDR'' comment=
'''' scope=spfile";
sql clone "alter system set db_file_name_convert =
''/u01/app/oracle/oradata/ORCLNDR'', ''/u01/app/oracle/oradata/ORCLFDR'', ''/u01/app/oracle/oradata/ORCL'', ''/u01/app/oracle/oradata/ORCLFDR'' comment=
'''' scope=spfile";
sql clone "alter system set log_file_name_convert =
''/u01/app/oracle/oradata/ORCLNDR'', ''/u01/app/oracle/oradata/ORCLFDR'', ''/u01/app/oracle/oradata/ORCL'', ''/u01/app/oracle/oradata/ORCLFDR'' comment=
'''' scope=spfile";
sql clone "alter system set fal_server =
''ORCLNDR'' comment=
'''' scope=spfile";
sql clone "alter system set standby_file_management =
''MANUAL'' comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set control_files = ''/u01/app/oracle/oradata/ORCLFDR/control01.ctl'', ''/u01/app/oracle/fast_recovery_area/ORCLFDR/control02.ctl'' comment= '''' scope=spfile
sql statement: alter system set db_unique_name = ''ORCLFDR'' comment= '''' scope=spfile
sql statement: alter system set db_file_name_convert = ''/u01/app/oracle/oradata/ORCLNDR'', ''/u01/app/oracle/oradata/ORCLFDR'', ''/u01/app/oracle/oradata/ORCL'', ''/u01/app/oracle/oradata/ORCLFDR'' comment= '''' scope=spfile
sql statement: alter system set log_file_name_convert = ''/u01/app/oracle/oradata/ORCLNDR'', ''/u01/app/oracle/oradata/ORCLFDR'', ''/u01/app/oracle/oradata/ORCL'', ''/u01/app/oracle/oradata/ORCLFDR'' comment= '''' scope=spfile
sql statement: alter system set fal_server = ''ORCLNDR'' comment= '''' scope=spfile
sql statement: alter system set standby_file_management = ''MANUAL'' comment= '''' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 1406373344 bytes
Fixed Size 5008864 bytes
Variable Size 369098752 bytes
Database Buffers 1023410176 bytes
Redo Buffers 8855552 bytes
contents of Memory Script:
{
restore clone from service 'orclndr' standby controlfile;
}
executing Memory Script
Starting restore at 28-JUL-26
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=41 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05
output file name=/u01/app/oracle/oradata/ORCLFDR/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/ORCLFDR/control02.ctl
Finished restore at 28-JUL-26
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/ORCLFDR/temp01.dbf";
set newname for tempfile 2 to
"/u01/app/oracle/oradata/ORCLFDR/pdbseed/temp01.dbf";
set newname for tempfile 3 to
"/u01/app/oracle/oradata/ORCLFDR/orclpdb1/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/ORCLFDR/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/ORCLFDR/pdbseed/system01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/ORCLFDR/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/ORCLFDR/pdbseed/sysaux01.dbf";
set newname for datafile 7 to
"/u01/app/oracle/oradata/ORCLFDR/users01.dbf";
set newname for datafile 9 to
"/u01/app/oracle/oradata/ORCLFDR/pdbseed/undotbs01.dbf";
set newname for datafile 11 to
"/u01/app/oracle/oradata/ORCLFDR/undotbs01.dbf";
set newname for datafile 12 to
"/u01/app/oracle/oradata/ORCLFDR/orclpdb1/system01.dbf";
set newname for datafile 13 to
"/u01/app/oracle/oradata/ORCLFDR/orclpdb1/sysaux01.dbf";
set newname for datafile 14 to
"/u01/app/oracle/oradata/ORCLFDR/orclpdb1/undotbs01.dbf";
set newname for datafile 15 to
"/u01/app/oracle/oradata/ORCLFDR/orclpdb1/users01.dbf";
restore
from nonsparse from service
'orclndr' clone database
;
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/ORCLFDR/temp01.dbf in control file
renamed tempfile 2 to /u01/app/oracle/oradata/ORCLFDR/pdbseed/temp01.dbf in control file
renamed tempfile 3 to /u01/app/oracle/oradata/ORCLFDR/orclpdb1/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 28-JUL-26
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/ORCLFDR/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:56
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/ORCLFDR/pdbseed/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:27
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/ORCLFDR/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/ORCLFDR/pdbseed/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:26
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/ORCLFDR/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/ORCLFDR/pdbseed/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/ORCLFDR/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/ORCLFDR/orclpdb1/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00013 to /u01/app/oracle/oradata/ORCLFDR/orclpdb1/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00014 to /u01/app/oracle/oradata/ORCLFDR/orclpdb1/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:08
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orclndr
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00015 to /u01/app/oracle/oradata/ORCLFDR/orclpdb1/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 28-JUL-26
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=23 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=24 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/pdbseed/system01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=25 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=26 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/pdbseed/sysaux01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=27 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/users01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=28 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/pdbseed/undotbs01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=29 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/undotbs01.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=30 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/orclpdb1/system01.dbf
datafile 13 switched to datafile copy
input datafile copy RECID=31 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/orclpdb1/sysaux01.dbf
datafile 14 switched to datafile copy
input datafile copy RECID=32 STAMP=1239814772 file name=/u01/app/oracle/oradata/ORCLFDR/orclpdb1/undotbs01.dbf
datafile 15 switched to datafile copy
input datafile copy RECID=33 STAMP=1239814773 file name=/u01/app/oracle/oradata/ORCLFDR/orclpdb1/users01.dbf
RMAN-05535: warning: All redo log files were not defined properly.
RMAN-05535: warning: All redo log files were not defined properly.
RMAN-05535: warning: All redo log files were not defined properly.
RMAN-05535: warning: All redo log files were not defined properly.
Finished Duplicate Db at 28-JUL-26
RMAN> exit
Here we got the warning error for redo log files. So let's check and resolve.Step 8: Check and Fix Redo Log Files
SQL> col MEMBER for a50
SELECT group#, type, member FROM v$logfile ORDER BY group#;
SQL>
GROUP# TYPE MEMBER
---------- ------- --------------------------------------------------
1 ONLINE /u01/app/oracle/oradata/ORCLFDR/redo01.log
2 ONLINE /u01/app/oracle/oradata/ORCLFDR/redo02.log
3 ONLINE /u01/app/oracle/oradata/ORCLFDR/redo03.log
4 STANDBY /u01/app/oracle/26ai/db_1/dbs/broken0
5 STANDBY /u01/app/oracle/26ai/db_1/dbs/broken1
6 STANDBY /u01/app/oracle/26ai/db_1/dbs/broken2
7 STANDBY /u01/app/oracle/26ai/db_1/dbs/broken3
7 rows selected.
Here we have issue with Standby Redo log files:
Drop & re-create the redo logs to resolve this:
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL;
System altered.
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 4;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 '/u01/app/oracle/oradata/ORCLFDR/standby_redo01.log' SIZE 200M;
Database altered.
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 5;
Database altered.
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 4;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 '/u01/app/oracle/oradata/ORCLFDR/standby_redo02.log' SIZE 200M;
Database altered.
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 6;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 '/u01/app/oracle/oradata/ORCLFDR/standby_redo03.log' SIZE 200M;
Database altered.
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP 7;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 7 '/u01/app/oracle/oradata/ORCLFDR/standby_redo04.log' SIZE 200M;
Database altered.
SQL> SELECT group#, type, member FROM v$logfile ORDER BY group#;
GROUP# TYPE MEMBER
---------- ------- --------------------------------------------------
1 ONLINE /u01/app/oracle/oradata/ORCLFDR/redo01.log
2 ONLINE /u01/app/oracle/oradata/ORCLFDR/redo02.log
3 ONLINE /u01/app/oracle/oradata/ORCLFDR/redo03.log
4 STANDBY /u01/app/oracle/oradata/ORCLFDR/standby_redo01.log
5 STANDBY /u01/app/oracle/oradata/ORCLFDR/standby_redo02.log
6 STANDBY /u01/app/oracle/oradata/ORCLFDR/standby_redo03.log
7 STANDBY /u01/app/oracle/oradata/ORCLFDR/standby_redo04.log
7 rows selected.
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO SCOPE=BOTH;
System altered.
Step 9: Start Real-Time Apply
Enable log shipment on the Near DR:
SQL> alter system set log_archive_dest_state_3= ENABLE scope=both;
System altered.
SQL> show parameter LOG_ARCHIVE_DEST_STATE_3
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_3 string enable
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
SQL> set lines 200 pages 1000
SQL> col DEST_NAME for a20
SQL> col DESTINATION for a20
SQL> col error for a30
SQL> select DEST_ID, DEST_NAME, STATUS, ERROR from v$archive_dest where DEST_NAME='LOG_ARCHIVE_DEST_3';
DEST_ID DEST_NAME STATUS ERROR
------- -------------------- --------- ------------------------------
3 LOG_ARCHIVE_DEST_3 VALID
Start apply at the Far DR:
[oracle@orclfdr ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Tue Jul 28 13:51:37 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED MOUNTED
3 ORCLPDB1 MOUNTED
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- ---------------
ORCL ORCLFDR PHYSICAL STANDBY MOUNTED
SQL> alter database recover managed standby database disconnect from session;
Database altered.
Switch a few logs on the primary and check the sync:
On Primary:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered..
SQL> set lines 200 pages 300
SQL> alter session set nls_date_format= 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select d.db_unique_name, a.thread#, b.last_seq, a.applied_seq, a.last_app_timestamp, b.last_seq - a.applied_seq ARC_DIFF
FROM
(select thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp from gv$archived_log where applied='YES' group by thread#) a,
(select thread#, MAX(sequence#) last_seq from gv$archived_log group by thread#) b,
(select db_unique_name from v$database) d where a.thread#=b.thread#;
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ LAST_APP_TIMESTAMP ARC_DIFF
------------------------------ ---------------- ---------- ---------- ----------- -------------------- ----------
ORCLDC PRIMARY 1 31 30 28-JUL-2026 18:30:58 1
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ LAST_APP_TIMESTAMP ARC_DIFF
------------------------------ ---------------- ---------- ---------- ----------- -------------------- ----------
ORCLDC PRIMARY 1 33 33 28-JUL-2026 19:00:59 0
On Near DR:
SQL> set lines 200 pages 300
SQL> alter session set nls_date_format= 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select d.db_unique_name, a.thread#, b.last_seq, a.applied_seq, b.last_seq - a.applied_seq ARC_DIFF, a.last_app_timestamp,
round((sysdate - a.last_app_timestamp)*24*60,2) Gap_in_Mins, round((sysdate - a.last_app_timestamp)*24*60*60,2) Gap_in_Seconds
FROM
(select thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp from v$archived_log where REGISTRAR='RFS' and applied='YES' group by thread#) a,
(select thread#, MAX(sequence#) last_seq from gv$archived_log group by thread#) b,
(select db_unique_name from v$database) d where a.thread#=b.thread#;
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ ARC_DIFF LAST_APP_TIMESTAMP GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLNDR PHYSICAL STANDBY 1 31 31 0 28-JUL-2026 18:31:01 13.9 834
SQL> /
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ ARC_DIFF LAST_APP_TIMESTAMP GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLNDR PHYSICAL STANDBY 1 33 33 0 28-JUL-2026 19:00:59 13.32 799
On Far DR:
SQL> set lines 200 pages 300
SQL> alter session set nls_date_format= 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select d.db_unique_name, a.thread#, b.last_seq, a.applied_seq, b.last_seq - a.applied_seq ARC_DIFF, a.last_app_timestamp,
round((sysdate - a.last_app_timestamp)*24*60,2) Gap_in_Mins, round((sysdate - a.last_app_timestamp)*24*60*60,2) Gap_in_Seconds
FROM
(select thread#, MAX(sequence#) applied_seq, MAX(next_time) last_app_timestamp from v$archived_log where REGISTRAR='RFS' and applied='YES' group by thread#) a,
(select thread#, MAX(sequence#) last_seq from gv$archived_log group by thread#) b,
(select db_unique_name from v$database) d where a.thread#=b.thread#;
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ ARC_DIFF LAST_APP_TIMESTAMP GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLFDR PHYSICAL STANDBY 1 27 27 0 28-JUL-2026 18:08:57 25.13 1508
SQL> /
DB_UNIQUE_NAME DATABASE_ROLE THREAD# LAST_SEQ APPLIED_SEQ ARC_DIFF LAST_APP_TIMESTAMP GAP_IN_MINS GAP_IN_SECONDS
------------------------------ ---------------- ---------- ---------- ----------- ---------- -------------------- ----------- --------------
ORCLFDR PHYSICAL STANDBY 1 33 33 0 28-JUL-2026 19:01:01 13.34 800
ARC_DIFF shows 0, confirming the standby is fully synced.
Sync Up Verification
Step 1: Verify Sync With a Real Change
As a final check, create a table on the primary and confirm it automatically appears on the both Near DR & Far DR.
On Primary:
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- --------------------
ORCL ORCLDC PRIMARY READ WRITE
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL> alter session set container=ORCLPDB1;
Session altered.
SQL> CREATE TABLE COMPANY (EMP_ID INT,NAME VARCHAR(255), COMPANY VARCHAR(255));
Table created.
SQL> INSERT INTO COMPANY VALUES (101,'Yash','WIPRO');
1 row created.
SQL> INSERT INTO COMPANY VALUES (102,'Vijay','AIRTEL');
1 row created.
SQL> commit;
Commit complete.
SQL> select count(*) from COMPANY;
COUNT(*)
----------
2
On Near DR:
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- --------------------
ORCL ORCLNDR PHYSICAL STANDBY MOUNTED
First cancel the managed recovery:
SQL> alter database recover managed standby database cancel;
Database altered.
Open the database in Read Only:
SQL> alter database open read only;
Database altered.
Start the managed recovery:
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- --------------------
ORCL ORCLNDR PHYSICAL STANDBY READ ONLY WITH APPLY
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 MOUNTED
SQL> alter pluggable database ORCLPDB1 open read only;
Pluggable database altered.
SQL>
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- --------------------
ORCL ORCLNDR PHYSICAL STANDBY READ ONLY WITH APPLY
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ ONLY NO
SQL> alter session set container=ORCLPDB1;
Session altered.
SQL> select count(*) from COMPANY;
COUNT(*)
----------
2
On Far DR (Follow similar steps):
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- ---------------
ORCL ORCLFDR PHYSICAL STANDBY MOUNTED
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database open read only;
Database altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select NAME,DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
--------- ------------------------------ ---------------- --------------------
ORCL ORCLFDR PHYSICAL STANDBY READ ONLY WITH APPLY
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 MOUNTED
SQL> alter pluggable database ORCLPDB1 open read only;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ ONLY NO
SQL>
SQL> alter session set container=ORCLPDB1;
Session altered.
SQL> select count(*) from COMPANY;
COUNT(*)
----------
2
SQL>
How This Compares to the Other Standby Methods
The earlier posts in this series each set up a single primary-to-standby pair, using RMAN backup and restore, RMAN Duplicate, or a restore from the primary's service. A Cascaded Standby is a different shape of problem: instead of one redo path, you're chaining two, with the intermediate standby forwarding what it receives rather than the primary shipping to every standby directly. That's the main reason to reach for this setup, it keeps the primary's direct redo connections down to one even as you add more downstream standbys, at the cost of an extra hop for redo to reach the far end.
Thank you for reading!
I hope this content has been helpful to you. Your feedback and suggestions are always welcome. Feel free to leave a comment or reach out with any queries.
Abhishek Shrivastava
Oracle DBA with hands-on experience managing production Data Guard, RAC, GoldenGate, and APEX environments. I write practical, tested installation and troubleshooting guides based on real deployment work.

Comments
Post a Comment