Oracle RAC Multitenant Database Cloning in 19c

🚀 Oracle RAC Multitenant Database Cloning in 19c is a game-changer for DBAs, enabling rapid provisioning of pluggable databases (PDBs) while maintaining high availability. Today, I’d like to share a step-by-step guide to achieve this efficiently. 💡

🔍 Use Case
Cloning a pluggable database (PDB) within an Oracle RAC environment is critical for creating development, testing, or troubleshooting copies of your production PDB.

📋 Prerequisites

1️⃣ Oracle RAC setup with Oracle 19c multitenant architecture.
2️⃣ Sufficient storage and permissions for the source and target databases.
3️⃣ ARCHIVELOG mode enabled on the source container database (CDB).
4️⃣ Source PDB in READ ONLY mode during cloning.

🛠️ Step-by-Step Guide

Step 1: Connect to the Source CDB
Log in to the source CDB as a user with sufficient privileges.

sqlplus / as sysdba

Step 2: Put the Source PDB in Read-Only Mode
Before cloning, set the source PDB to READ ONLY mode to ensure consistency.

ALTER PLUGGABLE DATABASE source_pdb CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE source_pdb OPEN READ ONLY;

Step 3: Initiate the Cloning Process

Run the following command to clone the PDB:

CREATE PLUGGABLE DATABASE clone_pdb FROM source_pdb
FILE_NAME_CONVERT = (‘/source/path/’, ‘/target/path/’);

👉 Use FILE_NAME_CONVERT to map the file paths for the source and target PDBs.

Step 4: Open the New PDB in Read/Write Mode
Once cloning is complete, open the new PDB in READ WRITE mode:

ALTER PLUGGABLE DATABASE clone_pdb OPEN READ WRITE;

Step 5: Update Services in Oracle RAC

Ensure the cloned PDB is registered with Oracle RAC services:

srvctl add service -d cdb_name -s service_name -pdb clone_pdb -preferred instance_name
srvctl start service -d cdb_name -s service_name

Step 6: Verify the Cloning

Log in to the cloned PDB and check its status:

SHOW PDBS;
SELECT NAME, OPEN_MODE FROM V$PDBS;

✨ Benefits of Multitenant Cloning

✅ Faster PDB provisioning.
✅ Ideal for test/dev environments.
✅ Reduced downtime with Oracle RAC high availability.

Leave a Reply

Your email address will not be published. Required fields are marked *