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 *