Oracle 19c Pluggable Database (PDB) Cloning Complete Guide (Step-by-Step Implementation)

 

1. Introduction

Oracle Multitenant architecture provides a flexible and efficient way to manage databases using Container Databases (CDB) and Pluggable Databases (PDB). One of its key advantages is the ability to rapidly provision and clone databases for development, testing, reporting, backup validation, and migration activities.

 

A Pluggable Database (PDB) clone is a copy of an existing PDB created within the same CDB or another CDB. Oracle 19c supports multiple cloning methods based on business requirements, downtime tolerance, and infrastructure design.

 In real-world enterprise environments, DBAs commonly receive requests such as:

  • Create DEV environment from Production
  • Refresh UAT with latest PROD data
  • Provision PREPROD for application testing
  • Create isolated environments for patch validation

 

Instead of manually creating databases and importing data, Oracle PDB cloning enables fast and efficient environment provisioning while maintaining Oracle Multitenant architecture standards.

 

In this implementation activity, the following Oracle 19c PDB cloning approaches were successfully performed and validated in a Linux x86_64 environment:

  • Approach 1 – Relocate / Hot Clone (Oracle 19c+)
  • Approach 2 – Local Clone from Existing PDB
  • Approach 3 – Clone from PDB$SEED (Fresh Empty PDB)

 

These cloning methods help reduce deployment time, simplify database provisioning, support rapid environment duplication, and improve operational flexibility for DBAs and application teams.

 

This document provides a practical step-by-step implementation guide for Oracle 19c PDB cloning methods, including provisioning, cloning operations, validation, and post-clone verification in a production-like environment.



2. Objective / Scope

Objective

• Understand Oracle 19c PDB cloning methods
• Create new PDBs using different cloning approaches
• Validate successful clone operations
• Preserve application schemas and data during cloning
• Demonstrate Oracle Multitenant provisioning capabilities

 

Scope

• Oracle Database 19c Environment
• Oracle Multitenant Architecture
• PDB Cloning Operations
• Single Instance Environment
• Non-RAC Setup
• File system-based database
• Local cloning and hot cloning methods
• Includes clone validation and post-check verification


3. Environment Details

Component

Value

Oracle Version

19.3.0.0.0

OS

Linux x86_64

CDB Name

PRODCDB

Source PDB

PROD

Storage Type

Filesystem

Architecture

Multitenant (CDB/PDB)

Cloning Methods

Seed Clone, Local Clone, Hot Clone


4. Prerequisites

• Source PDB should be healthy and accessible
• Ensure enough filesystem storage is available
• Verify target file locations and permissions
• Enable ARCHIVELOG mode for hot clone operations if required
• Ensure local undo mode is enabled for hot cloning
• Take backup before cloning activity
• Verify no file name conflicts exist
• Validate listener and service connectivity


5. Implementation

Verify Existing CDB and PDB Environment

Before cloning operations, verify the CDB and existing PDB details.

Purpose:
• Validate source environment
• Confirm PDB availability
• Verify database open mode and health

 

 

 

Validation includes:
• CDB status
• PDB status
• Database version
• Application schemas and tables

This ensures the environment is ready for cloning activities.

 

Approach 1 – Relocate / Hot Clone (Oracle 19c+)

This method allows a PDB to be cloned or relocated while the source PDB remains online and accessible to users. Oracle 19c introduced Hot Clone capability to minimize downtime during migration or cloning activities.

It is commonly used for workload migration, environment refresh, database consolidation, and moving PDBs between CDBs with minimal service interruption.

 

Purpose:
• Reduce downtime during cloning
• Clone active databases
• Improve operational flexibility

Requirements:
• ARCHIVELOG mode enabled
• Local undo enabled
• Source PDB in READ WRITE mode

 

Enable ARCHIVELOG Mode

Hot cloning in Oracle 19c requires the source database to run in ARCHIVELOG mode.
This allows Oracle to maintain transactional consistency while cloning the PDB online without downtime.

Database was restarted in MOUNT mode and ARCHIVELOG was enabled.

 

Commands used:

 

 

Verification:



 

PDB status was also verified:

This step ensures the source environment is ready for online cloning operations.

 

Verify Hot Clone Prerequisites

Oracle 19c Hot Clone requires LOCAL UNDO mode to be enabled in the Container Database (CDB).

Validation performed:

 

 

If the value is FALSE, LOCAL UNDO must be enabled before proceeding with Hot Clone operations.

Purpose of this step:

  • Validate Oracle 19c Hot Clone requirements
  • Ensure online cloning support
  • Prevent clone operation failure

 

Prepare Target Directory for Clone PDB

A new operating system directory was created for the target UAT PDB datafiles.

Commands used:

 

Verification:



Purpose:

  • Store cloned PDB datafiles
  • Maintain separate filesystem structure
  • Avoid file conflicts with source PDB

 

Source PDB PROD was also verified in READ WRITE mode because Hot Clone requires the source PDB to remain online during cloning.

Verification:




Perform Hot Clone Operation

The UAT PDB was cloned online from the existing PROD PDB using the CREATE PLUGGABLE DATABASE statement.

Command used:



 

Explanation:

  • FROM PROD → Source PDB for cloning
  • FILE_NAME_CONVERT → Changes source file paths to target clone location

 

Verification:



Output confirmed:

  • Source PDB PROD remained online
  • Target PDB UAT was created successfully in MOUNTED state

 

Datafiles were also validated:

This step successfully completed the online PDB clone operation without shutting down the source PDB.

 

Open and Configure Cloned PDB

After cloning, the newly created UAT PDB was opened in READ WRITE mode.

Command used:



 

Verification:



 

 

PDB state was saved for automatic startup after database restart:



 

Purpose of this step:

  • Activate cloned PDB
  • Validate clone health
  • Ensure persistent open state after restart

 

Verify Cloned PDB Datafiles

Final validation was performed to confirm that all cloned datafiles were created successfully under the target UAT directory.

Command used:

 

Verification confirmed:

  • SYSTEM tablespace datafile
  • SYSAUX tablespace datafile
  • UNDO tablespace datafile
  • USER datafiles

 

This step confirms successful Oracle 19c Hot Clone implementation and proper datafile mapping for the cloned UAT PDB.

Approach 2 – Local Clone from Existing PDB

This method creates a duplicate copy of an existing PDB inside the same Container Database (CDB). It is mainly used when an exact copy of a database is required for DEV, UAT, reporting, testing, or troubleshooting purposes.

The cloned PDB includes application schemas, objects, and data, making it useful for quickly provisioning environments without manual export/import activities.

 

Verify Existing PDB Environment

First, the existing PDB environment was verified to confirm the source PDB status before starting the clone operation.

Verification:

Output confirmed:

  • PROD PDB available as source database
  • UAT PDB already operational
  • Source PDB PROD running in READ WRITE mode

This step ensures the source environment is ready for local cloning activity.

 

Open Source PDB in READ ONLY Mode

For local cloning operations, the source PDB was opened in READ ONLY mode to maintain consistency during the clone process.

Commands used:

 

Verification:

Purpose of this step:

  • Maintain consistent clone copy
  • Prevent data modifications during cloning
  • Prepare source PDB for local clone operation

Output confirmed:

  • PROD opened successfully in READ ONLY mode

 

Prepare Target Directory for PREPROD PDB

A new operating system directory was created for the PREPROD PDB datafiles.

Command used:

Purpose:

  • Store cloned PREPROD datafiles
  • Maintain separate filesystem structure
  • Avoid conflicts with source PDB datafiles

This step prepares the target location for cloned database files.

 

Create PREPROD PDB Using Local Clone

The PREPROD PDB was created by cloning the existing PROD PDB within the same Container Database (CDB).

Command used:

Explanation:

  • FROM PROD → Source PDB for cloning
  • FILE_NAME_CONVERT → Maps source file paths to target PREPROD location

 

Verification:

Output confirmed:

  • PREPROD PDB created successfully
  • Initial status showed as MOUNTED

This step completed the local PDB cloning operation successfully.

 

Open and Configure PREPROD PDB

After successful cloning, the PREPROD PDB was opened in READ WRITE mode.

Command used:

Output confirmed:

  • PREPROD opened successfully in READ WRITE mode

Purpose:

  • Activate cloned PDB
  • Make database available for application access
  • Validate successful clone operation

 

Reopen Source PROD PDB in READ WRITE Mode

After clone completion, the source PROD PDB was reopened in READ WRITE mode for normal operations.

Commands used:

Output confirmed:

  • PROD returned to READ WRITE mode
  • PREPROD and UAT remained operational

 

PDB states were saved:

This step restores the production PDB to normal operational mode.

 

Verify PREPROD Datafiles

Final validation was performed to confirm successful creation of PREPROD datafiles in the target filesystem location.

Command used:

Verification confirmed:

  • SYSTEM tablespace datafile
  • SYSAUX tablespace datafile
  • UNDO tablespace datafile
  • USER datafiles

 

This step confirms successful Oracle 19c Local Clone implementation and proper filesystem mapping for PREPROD PDB.

 

 

Approach 3 – Clone from PDB$SEED (Fresh Empty PDB)

This method creates a brand-new empty Pluggable Database using the default Oracle template database called PDB$SEED. It is commonly used when a fresh environment is required for new applications, development, or testing activities without copying existing application data.

This approach is simple, fast, and widely used for standard PDB provisioning in Oracle Multitenant architecture.

 

Verify Existing PDB Environment

First, verify the existing CDB and available PDBs before creating the new DEV PDB.

Command used:

Verification confirmed:

  • PROD, UAT, and PREPROD PDBs were available
  • PDB$SEED was in READ ONLY mode
  • CDB environment was healthy and operational

Create OS Directory for DEV PDB

A dedicated filesystem directory was created to store DEV PDB datafiles.

Commands used:

Purpose of this step:

  • Create separate storage location for DEV PDB
  • Organize datafiles properly
  • Maintain clean multitenant structure

Verification confirmed the directory was created successfully.

 

Create DEV PDB from PDB$SEED

An attempt was initially made without specifying an ADMIN USER, which resulted in an ORA-00922 syntax error.

Observation:

  • Fresh PDB creation from PDB$SEED requires an ADMIN USER because no application users exist inside the seed database.

 

Correct command used:

Purpose of this step:

  • Create fresh empty DEV PDB
  • Generate new datafiles from PDB$SEED
  • Create initial administrative user

Explanation:

  • ADMIN USER creates local PDB administrator
  • FILE_NAME_CONVERT maps seed datafiles to DEV location
  • PDB is initially created in MOUNTED mode

Verification:

Output confirmed:

  • DEV PDB created successfully
  • Initial status showed as MOUNTED

 

Open DEV PDB and Verify

The newly created DEV PDB was opened in READ WRITE mode.

Command used:

Output confirmed:

  • DEV PDB opened successfully
  • Status changed to READ WRITE

 

Validate Datafiles and Save State

Datafiles for DEV PDB were verified to confirm proper file creation.

Command used:



Verification confirmed:

  • DEV datafiles were created successfully
  • Files existed under /u02/oradata/PRODCDB/DEV/

 

Finally, PDB state was saved.

Command used:



Purpose:

  • Automatically open DEV PDB after database restart
  • Preserve current open state

Final validation confirmed:

  • DEV PDB operational successfully
  • Fresh empty PDB provisioning completed successfully

6. Risks and Mitigation

Risks

• Insufficient storage during clone operation
• File path conflicts
• Clone failure due to open mode restrictions
• Service registration issues
• Application connectivity failures
• Performance impact during large clone operations

 

Mitigation

• Verify free storage before cloning
• Validate file locations carefully
• Take backup before implementation
• Perform testing in UAT first
• Validate listener and services
• Monitor alert logs during clone operation
• Validate cloned application data post clone


7. Key Observations

• Oracle 19c Multitenant architecture supports multiple PDB cloning methods
• PDB$SEED cloning creates fresh empty PDBs quickly
• Local cloning preserved application schemas and data successfully
• Hot clone operation allowed source PDB to remain online
• File system-based cloning completed successfully
• All cloned PDBs opened successfully in READ WRITE mode
• Application connectivity validation completed successfully
• Data consistency verified successfully after cloning
• Clone operations significantly reduced provisioning effort


8. Benefits

• Rapid database provisioning
• Simplified environment creation
• Faster development and testing setup
• Reduced manual administration effort
• Supports Oracle Multitenant architecture
• Enables efficient database consolidation
• Preserves application schemas and data
• Supports modern Dev/Test workflows
• Improves operational flexibility
• Enables faster database deployment strategies


9. Conclusion

Oracle 19c PDB cloning activities were successfully completed using multiple multitenant cloning approaches in a production-like environment.

The implementation included:

  • DEV PDB creation using the PDB$SEED approach
  • PREPROD PDB creation using Local Clone from existing PROD PDB
  • UAT PDB creation using Oracle 19c Hot Clone functionality

The activity validated:

  • Successful multitenant provisioning
  • Online and offline cloning capabilities
  • Proper datafile creation and mapping
  • Successful preservation of application schemas and data
  • Post-clone validation and application accessibility

All PDB clone operations completed successfully with proper verification, filesystem validation, and Oracle Multitenant architecture compliance.


Caution / Disclaimer

The information provided in this document is for educational and learning purposes only.

Although the procedures were tested successfully in a controlled environment, always perform proper validation and testing in UAT or non-production environments before implementing in production systems.

Ensure proper backups, rollback planning, and storage validation before performing any cloning activity.

 

Thank You