top of page

Creating a Standby Using Pluggable Database (PDB) Duplication: A Practical Guide

  • Jun 10, 2025
  • 3 min read

Updated: Jan 29


With the introduction of Multitenant Architecture in Oracle Database 12c and beyond, managing databases through Pluggable Databases (PDBs) has become the standard. When setting up Disaster Recovery (DR) or High Availability (HA) architectures, creating a standby database using PDB duplication is now a strategic and efficient method—especially for Data Guard environments or custom standby setups.

This blog provides a comprehensive step-by-step guide to perform PDB-level duplication for standby preparation using RMAN, suitable for both on-premises and Oracle Cloud Infrastructure (OCI) environments.

Understanding PDB Duplication for Standby
Oracle allows you to duplicate an individual PDB from a primary CDB (Container Database) to a standby CDB. This is highly useful when:
  • You want DR for specific PDBs, not the entire CDB.
  • You have consolidated environments with multiple PDBs, each needing independent recovery options.
  • You want to replicate specific services for regulatory, geographical, or testing purposes.

Architecture Overview
The general architecture includes:
  • Primary CDB: Contains the source PDB (e.g., PDB1)
  • Standby CDB: Destination CDB where the standby copy of the PDB will reside
  • RMAN: Used to duplicate and recover the PDB
  • Oracle Net Services: Configured between source and destination hosts

Prerequisites
Before beginning, ensure the following:
  • Source and target Oracle versions are compatible (typically same release and patch level)
  • Oracle Net connection is working between primary and standby
  • CDBs are open in read-write mode
  • PDB to duplicate is in read-only mode (if using active duplication)
  • Adequate storage and memory resources
  • Listener and TNS entries are configured properly
  • Required RMAN permissions and backup sets (if using backup-based duplication)

Step-by-Step Guide: PDB Duplication for Standby

1. Enable Archivelog Mode and Force Logging
On the source CDB, ensure:
ALTER DATABASE FORCE LOGGING; ARCHIVE LOG LIST;

2. TNS Configuration
Update tnsnames.ora or EZConnect strings for both source and target:

source_cdb = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = source-host)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = source_cdb) ) ) target_cdb = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = target-host)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = target_cdb) ) )
Test connection using:
tnsping source_cdb tnsping target_cdb

3. Start Auxiliary Instance (if required)
If using non-CDB container duplication, create a password file and start the auxiliary instance in nomount state:

sqlplus / as sysdba STARTUP NOMOUNT;

4. Duplicate PDB Using RMAN
Connect to RMAN from the standby server:
rman target sys@source_cdb auxiliary sys@target_cdb
Run the duplication command:
DUPLICATE PLUGGABLE DATABASE pdb1 TO pdb1_standby FROM ACTIVE DATABASE USING COMPRESSED BACKUPSET SECTION SIZE 1G NOOPEN;
  • FROM ACTIVE DATABASE: Uses the source's current state without backups
  • NOOPEN: Keeps the PDB in MOUNTED state post-duplication (recommended for standby)

5. Post-Duplication Steps
  • Check the status of the PDB on the standby:
SELECT NAME, OPEN_MODE FROM V$PDBS;
  • Ensure logs are applied using Data Guard or custom log shipping mechanism.
  • Configure tnsnames.ora and services for the new standby PDB.

OCI-Specific Considerations
If deploying on OCI:
  • Use OCI Object Storage for backup-based duplication
  • Use OCI GoldenGate or Data Guard Cloud Service for automated DR
  • Ensure that VCNs, subnets, and security lists allow inter-CDB communication

Best Practices
  • Test duplication in a non-prod environment first
  • Keep the standby CDB in sync with the primary
  • Use Data Guard Broker for easier management of roles and switchover/failover
  • Regularly validate archive log shipping and application

Common Errors & Fixes
Issue
Fix
ORA-17629 / ORA-17627
Check network connectivity and permissions
RMAN-05535
Ensure PDB is in READ ONLY mode if required
ORA-65010
Target PDB name conflicts; use a unique name
Conclusion
Pluggable database duplication is a powerful feature in Oracle Multitenant environments, allowing you to prepare standby instances tailored to specific application needs. Whether you are operating on-premises or on OCI, Oracle provides flexible tools like RMAN to enable robust, secure, and efficient duplication of PDBs with minimal disruption.
Using this method, enterprises can achieve granular disaster recovery, reduced RTO, and greater database consolidation control—key aspects of any modern DBA strategy.

Comments


AiTech

©2023 by AiTech

bottom of page