Post Contents

Oracle 19c Upgrading and Transporting CDBs and PDBs

Oracle 19c Upgrading and Transporting CDBs and PDBs

Upgrading and transporting Container Databases (CDBs) and Pluggable Databases (PDBs) in Oracle 19c are critical tasks for database administrators. These tasks ensure that database environments remain up-to-date and flexible for various purposes such as performance improvements, security updates, and data mobility. This guide will provide a comprehensive walkthrough on how to Upgrade CDB and Transport PDB.

 

Understanding CDB and PDB Upgrades

CDB and PDB Upgrades involve updating the database software and schema to a newer version. This process is essential for maintaining the performance, security, and compatibility of the database environment.

Benefits of Upgrading

  1. Performance Improvements: Upgrading to the latest version can enhance the performance of the database by optimizing existing features and introducing new ones.
  2. Security Enhancements: Newer versions of Oracle databases include security patches and enhancements that protect against vulnerabilities.
  3. Feature Availability: Upgrading provides access to the latest features and functionalities, improving overall database management and capabilities.

 

Steps to Upgrade CDB

đŸ“¢ You might also like: Oracle 19c Upgrade Multitenant Database (Category: Oracle Database Admin)

Step 1: Pre-Upgrade Checks

Before upgrading, perform the necessary pre-upgrade checks to ensure the database is ready for the upgrade.

Run the Pre-Upgrade Information Tool:

cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> @preupgrade_info.sql

Review the output for any warnings or recommendations and address them before proceeding with the upgrade.

Step 2: Backup the Database

Create a full backup of the CDB to ensure that you can restore it in case of any issues during the upgrade process.

Example RMAN Backup Command:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Step 3: Upgrade the Database

Use the Database Upgrade Assistant (DBUA) or command-line utilities to perform the upgrade.

Using DBUA:

  1. Start DBUA: dbua
  2. Follow the on-screen instructions to select the CDB and perform the upgrade.

Using Command-Line Utilities:

  1. Set the environment variables:
    export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1
    export PATH=$ORACLE_HOME/bin:$PATH
  2. Run the upgrade script:
    export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1
    export PATH=$ORACLE_HOME/bin:$PATH
    cd $ORACLE_HOME/rdbms/admin
    sqlplus / as sysdba
    SQL> @catupgrd.sql

Step 4: Post-Upgrade Checks

After the upgrade, run post-upgrade checks to ensure everything is functioning correctly.

Run the Post-Upgrade Status Tool:

cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> @utluptab.sql

Review the output and verify that all components are upgraded successfully.

 

Upgrade on CDB – Transporting PDBs

Transporting PDBs involves moving a PDB from one CDB to another. This process is crucial for database mobility, allowing DBAs to manage workloads and data more efficiently.

Steps to Transport PDB

Step 1: Close and Unplug the PDB

Close the PDB and create an XML file for the unplugged PDB.

Close the PDB:

SQL> ALTER PLUGGABLE DATABASE pdb_name CLOSE IMMEDIATE;

Unplug the PDB:

SQL> ALTER PLUGGABLE DATABASE pdb_name UNPLUG INTO '/path/to/pdb_name.xml';

Step 2: Copy Datafiles and XML File

Copy the PDB datafiles and XML file to the target CDB environment.

Example:

scp /path/to/pdb_name.xml oracle@target_server:/path/to/
scp /path/to/datafiles/* oracle@target_server:/path/to/datafiles/

Step 3: Plug the PDB into the Target CDB

Connect to the target CDB and plug the PDB using the XML file.

Plug the PDB:

SQL> CREATE PLUGGABLE DATABASE pdb_name USING '/path/to/pdb_name.xml' COPY;

Step 4: Open the PDB

Open the PDB in the target CDB.

Open the PDB:

SQL> ALTER PLUGGABLE DATABASE pdb_name OPEN;

 

Upgrade CDB – Verifying the Upgrade and Transport

After completing the upgrade and transport, verify that the CDB and PDBs are operational and consistent.

Check Database Status:

SQL> SELECT NAME, OPEN_MODE FROM V$DATABASE;
SQL> SELECT NAME, OPEN_MODE FROM V$PDBS;

Validate Data Integrity:

Perform a quick validation to ensure that the data within the new CDB and PDB is consistent and intact.

DBMS_UTILITY.DB_VERIFY(start_block => 1, end_block => DBMS_UTILITY.MAX_BLOCK);

 

Upgrade CDB – Managing Upgraded and Transported Databases

Effective management of upgraded and transported databases involves regular monitoring, maintenance, and applying necessary updates. Oracle Enterprise Manager (OEM) monitors the performance and status of the databases.

Monitoring Databases:

Oracle Enterprise Manager monitors the resource usage, performance metrics, and overall health of the databases.

Applying Updates and Patches:

Keep the upgraded and transported databases up to date with the latest patches and updates to maintain security and performance.

 

Conclusion

Upgrading and transporting CDBs and PDBs in Oracle 19c are powerful features that enhance the flexibility and manageability of database environments. By following the steps outlined in this guide, DBAs can efficiently Upgrade CDB and Transport PDB, ensuring that their databases are robust, scalable, and prepared for various scenarios.

Start leveraging Container Database Upgrade and Pluggable Database Transport in your Oracle environment today to enhance your database management capabilities and ensure your data remains protected and easily recoverable.

See more on Oracle’s website!

Be Oracle Database Certified Professional, this world is full of opportunities for qualified DBAs!

Leave a Comment

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

Scroll to Top