Oracle Database 19c Non-CDB to PDB Migration using DBMS_PDB Plug-In Method Complete Guide (step-by-step implementation)

 



1. Introduction

With the evolution of Oracle Multitenant architecture, Oracle recommends migrating traditional Non-CDB databases to Container Databases (CDB) with Pluggable Databases (PDB). This architecture provides better resource management, simplified administration, improved consolidation, and easier future upgrades and patching operations.

A Non-CDB to PDB migration is the process of converting an existing standalone Oracle database into a Pluggable Database inside a Container Database (CDB). Oracle provides multiple migration methods for this activity, and one of the most commonly used approaches is the DBMS_PDB package method.

The DBMS_PDB.DESCRIBE procedure generates an XML metadata file of the source Non-CDB database. This XML file is then used to plug the database into the target CDB as a PDB. After plugging in, Oracle’s noncdb_to_pdb.sql script converts the database metadata and completes the migration process.

This method is widely used because it:

• Supports controlled migration with minimal complexity
• Allows migration on the same server or different servers
• Preserves existing application schemas and data
• Simplifies consolidation into multitenant architecture
• Supports future Oracle upgrade and patching strategies

 

Without proper migration planning and validation:

• Plug-in compatibility issues may occur
• Character set mismatches can cause warnings
• Database options mismatch may appear
• Application connectivity may fail after migration
• Metadata conversion may remain incomplete

 

In this activity, a standalone Oracle 19c Non-CDB database (PROD) was successfully migrated and plugged into a target Oracle 19c Container Database (PRODCDB) as a Pluggable Database using the DBMS_PDB method in a Linux x86_64 environment.

The implementation includes source database validation, target CDB creation, XML generation using DBMS_PDB.DESCRIBE, compatibility checks, PDB plug-in operation, execution of noncdb_to_pdb.sql, and post-migration validation to confirm successful conversion and application connectivity.

This document provides a complete step-by-step implementation guide for performing Oracle 19c Non-CDB to PDB migration using the DBMS_PDB plug-in method in a practical and production-like environment.


2. Objective / Scope

Objective

• Migrate Oracle 19c Non-CDB database to Multitenant architecture
• Convert standalone database into a Pluggable Database (PDB)
• Implement Oracle recommended CDB/PDB architecture
• Preserve application data and schemas during migration
• Validate successful plug-in and database functionality

 

Scope

• Oracle Database 19c Environment
• Non-CDB to PDB Migration
• DBMS_PDB Plug-in Method
• Single Instance Environment
• Non-RAC Setup
• File system-based database
• Migration performed on same Linux server
• Includes compatibility checks, plug-in process, metadata conversion, and post-validation


3. Environment Details

Component

Value

Oracle Version

19.3.0.0.0

OS

Linux x86_64

Source Database

PROD (Non-CDB)

Target CDB

PRODCDB

Target PDB

PROD

Storage Type

Filesystem

Migration Method

Plug-In Method


4. Prerequisites

• Open source database in READ ONLY mode before XML generation
• Ensure XML file path has write permission
• Take database backup before migration
• Verify compatibility before plug-in operation
• Ensure no active transactions during migration


5. Implementation

5.1 Verify Source Non-CDB Database Environment

First, verify the source database details, database type, instance information, and application data before migration.

This confirms that the database is a Non-CDB and ensures all objects and data are available before conversion.

 

Application tables and sample data were also validated:

This step ensures source database consistency before plug-in activity.

5.2 Create Target Container Database (CDB)

A new Oracle 19c Container Database (CDB) was created on the same server using DBCA in silent mode.

Purpose of this step:

  • Create target multitenant architecture
  • Host the Non-CDB as a Pluggable Database (PDB)
  • Prepare migration destination

Command used:

 

Verification:

Output confirmed:

  • PDB$SEED available
  • No user PDBs created initially

This step prepares the target multitenant environment.

 

5.3 Generate XML Metadata Using DBMS_PDB.DESCRIBE

The source Non-CDB database was opened in READ ONLY mode for consistency and metadata extraction.

Why READ ONLY?

  • Prevents data changes during migration
  • Ensures clean metadata generation

Commands used:

 

Generate XML descriptor file:


Purpose of XML file:

  • Stores metadata of the Non-CDB
  • Used by target CDB during plug-in operation
  • Contains tablespace and datafile information

 

Verification:



After XML generation, source database was shutdown.

 

5.4 Check Compatibility and Plug Non-CDB into CDB

Before plug-in operation, compatibility validation was performed using DBMS_PDB.CHECK_PLUG_COMPATIBILITY.

Purpose:

  • Verify whether Non-CDB can be plugged into target CDB
  • Detect character set or component mismatches

Command used:

 

Plug-in operation performed using:



Explanation:

  • COPY copies datafiles to new CDB location
  • FILE_NAME_CONVERT changes source file paths to target paths

Verification:

Output confirmed:

  • PDB PROD created successfully
  • Status initially showed as MOUNTED

 

5.5 Convert Plugged Database into Proper PDB and Validate

After plug-in, the database still behaves like a Non-CDB internally.
Oracle requires execution of noncdb_to_pdb.sql to complete conversion.

Purpose of this step:

  • Remove Non-CDB metadata
  • Convert dictionary objects
  • Complete multitenant conversion

Switch to PDB & Run conversion script:

@$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql

 

 

 

Plug-in violations were reviewed:

Observation:

  • ERROR + PENDING requires fixing
  • WARNING + PENDING is informational
  • RESOLVED indicates issue fixed successfully

 

Final validation included:

  • User validation
  • Table validation
  • Application data validation
  • Datafile verification

 


 

Application schema APP_USER and all tables/data were successfully accessible after conversion.


6. Risks and Mitigation

Risks

·       Compatibility issues during plug-in

·       Character set mismatch warnings

·       PDB plug-in violations

·       Incorrect file path mapping

·       Failure during noncdb_to_pdb.sql

·       Application connectivity issues after migration

Mitigation

·       Perform migration in UAT/Test first

·       Take full RMAN backup before migration

·       Validate compatibility using DBMS_PDB.CHECK_PLUG_COMPATIBILITY

·       Carefully review PDB_PLUG_IN_VIOLATIONS

·       Validate file locations before plug-in

·       Verify application data after migration

·       Test application connectivity post migration


7. Key Observations

• Source Non-CDB database PROD was successfully identified with CDB=NO
• Target CDB PRODCDB was created successfully without any user PDBs
• XML metadata file was generated successfully using DBMS_PDB.DESCRIBE
• Compatibility check using DBMS_PDB.CHECK_PLUG_COMPATIBILITY returned YES
• Plug-in operation completed successfully using COPY option
• noncdb_to_pdb.sql converted the Non-CDB metadata successfully
• PDB status changed from NEW to NORMAL after conversion
• Application schemas, users, and tables were preserved successfully
• All application data was accessible after migration
• Plug-in violations showed only informational warnings after conversion


8. Benefits

• Migrates legacy Non-CDB database to Oracle Multitenant architecture
• Enables adoption of Oracle recommended CDB/PDB model
• Simplifies future database upgrades and patching
• Improves database consolidation and management
• Preserves existing application data and schemas
• Supports better scalability and resource utilization
• Reduces administrative overhead
• Provides easier cloning and provisioning capabilities
• Improves overall operational flexibility in Oracle 19c environment


9. Conclusion

The Oracle Database 19c Non-CDB to Multitenant migration was successfully completed using the plug-in method.

The source Non-CDB database was migrated into the target CDB as a fully functional PDB with all application data, users, and objects intact.

The migration validated:

  • Successful Non-CDB to PDB conversion
  • Proper CDB/PDB functionality
  • Successful application connectivity
  • Data consistency after migration
  • Successful multitenant adoption in Oracle 19c

Caution / Disclaimer

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

Although the procedure was tested successfully in a controlled environment, always perform proper testing in UAT or non-production environments before implementing in production systems.

Ensure that complete backups and rollback plans are available before performing any migration activity.

 

Thank You