
In the world of Oracle 19c, managing Container Databases (CDBs) and Pluggable Databases (PDBs) is crucial for efficient database administration. This blog will provide an overview of how to effectively Administer CDBs and PDBs, focusing on Oracle Database Multitenant Architecture. We’ll cover key aspects of CDB Administration and PDB Administration to help you optimize your Oracle environment.
Manage CDBs – Understanding CDB and PDB Architecture
Managing CDBs and PDBs involves understanding the fundamental architecture of Oracle 19c’s multitenant feature.
- Container Database (CDB): The CDB is the primary database that contains multiple PDBs. It includes system metadata and common user data.
- Benefits: Centralized management, reduced overhead, and resource sharing.
- Container Database (CDB): The CDB is the primary database that contains multiple PDBs. It includes system metadata and common user data.
- Pluggable Database (PDB): A PDB is a portable collection of schemas, schema objects, and non-schema objects that appears to an application as a non-CDB.
- Benefits: Easy cloning, patching, and upgrading.
- Pluggable Database (PDB): A PDB is a portable collection of schemas, schema objects, and non-schema objects that appears to an application as a non-CDB.
Manage CDBs
Administer CDBs effectively is crucial for overall database performance. Here are some key steps in CDB Administration:
- Creating a CDB: Use the Database Configuration Assistant (DBCA) or SQL commands to create a CDB.
CREATE DATABASE cdb1 ENABLE PLUGGABLE DATABASE SEED SYSTEM DATAFILES SIZE 125M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED SYSAUX DATAFILES SIZE 100M;
- Creating a CDB: Use the Database Configuration Assistant (DBCA) or SQL commands to create a CDB.
- Managing Users and Roles: Create common users and roles that can be shared across all PDBs within the CDB.
CREATE USER common_user IDENTIFIED BY password; GRANT DBA TO common_user CONTAINER=ALL;
- Managing Users and Roles: Create common users and roles that can be shared across all PDBs within the CDB.
📢 You might also like: Oracle 19c Manage PDB Service Names and Connections (Category: Oracle Database Admin)
Manage PDBs
PDB Administration involves tasks specific to managing individual PDBs within a CDB. Here are some important aspects:
- Creating and Dropping PDBs: Use SQL commands to create new PDBs or drop existing ones.
CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb_admin IDENTIFIED BY password; DROP PLUGGABLE DATABASE pdb1 INCLUDING DATAFILES;
- Creating and Dropping PDBs: Use SQL commands to create new PDBs or drop existing ones.
- Cloning PDBs: Clone PDBs for testing or deployment purposes.
CREATE PLUGGABLE DATABASE pdb_clone FROM pdb1;
- Cloning PDBs: Clone PDBs for testing or deployment purposes.
- Migrating PDBs: Migrate PDBs between different CDBs for load balancing or hardware upgrades.
ALTER PLUGGABLE DATABASE pdb1 UNPLUG INTO '/path/to/pdb1.xml'; CREATE PLUGGABLE DATABASE pdb1 USING '/path/to/pdb1.xml' COPY;
- Migrating PDBs: Migrate PDBs between different CDBs for load balancing or hardware upgrades.
Manage CDBs – Best Practices for CDB and PDB Management
Implementing best practices ensures efficient and secure management of CDBs and PDBs. Here are some recommendations:
- Regular Backups: Perform regular backups of both CDBs and PDBs to prevent data loss.
- Monitoring and Alerts: Set up monitoring and alerts for key performance metrics to detect and address issues promptly.
- Security Measures: Implement strict access controls and regularly update security patches.
See more on Oracle’s website!
Conclusion
Managing CDBs and PDBs in Oracle 19c is essential for leveraging the full potential of Oracle’s multitenant architecture. By understanding the architecture, effectively managing CDBs and PDBs, and following best practices, you can ensure optimal performance and security of your Oracle databases.
Be Oracle Database Certified Professional, this world is full of opportunities for qualified DBAs!