101 views
asked in Oracle by
What is pluggable database (PDB) in Oracle 23ai

1 Answer

answered by

A Pluggable Database (PDB) is a self-contained, portable collection of schemas, objects, and related database structures that resides within a larger Container Database (CDB) in Oracle's Multitenant Architecture. This architecture, introduced in Oracle Database 12c, allows multiple PDBs to share a single CDB's system resources (memory, processes, etc.) while maintaining data isolation and independent management capabilities.

Key Concepts of PDB

  1. Container Database (CDB):

    • A CDB is the top-level database that houses multiple PDBs. It contains the root container (CDB$ROOT) and optionally a seed PDB (PDB$SEED), which serves as a template for creating new PDBs.
    • The root container stores shared metadata and system information used by all PDBs.
  2. Pluggable Database (PDB):

    • A PDB is a fully functional, self-contained database that resides within the CDB.
    • Each PDB has its own:
      • User schemas.
      • Tablespaces.
      • Metadata.
      • Security policies.
  3. Isolation:

    • Each PDB operates independently from other PDBs in terms of security, schemas, and user management.
    • However, all PDBs share the same database instance, including memory and background processes.
  4. Portability:

    • PDBs can be easily unplugged from one CDB and plugged into another, making it ideal for consolidating and migrating databases.
  5. Seed PDB (PDB$SEED):

    • A read-only template PDB used for creating new PDBs.
    • It is automatically included in every CDB.

Advantages of PDBs

  1. Database Consolidation:

    • Multiple PDBs can run within a single CDB, reducing resource usage compared to running multiple standalone databases.
  2. Ease of Migration:

    • PDBs can be unplugged from one CDB and plugged into another, facilitating easy database migration.
  3. Independent Management:

    • Each PDB can be backed up, restored, and managed independently of other PDBs.
  4. Resource Sharing:

    • PDBs share memory and processes of the CDB, which reduces overhead and improves resource utilization.
  5. Cost Efficiency:

    • Ideal for consolidating databases in environments with Oracle Multitenant licensing, reducing operational costs.

Common Use Cases

  1. Database Consolidation:

    • Organizations consolidating multiple databases into a single infrastructure to reduce resource usage and licensing costs.
  2. Development and Testing:

    • Developers can create multiple isolated environments for testing within a single CDB.
  3. Simplified Upgrades:

    • Upgrading the CDB automatically applies to all PDBs.
  4. Cloud and Multitenancy:

    • Cloud service providers use PDBs to deliver Database-as-a-Service (DBaaS) to multiple customers, maintaining isolation.

Example: Viewing and Switching to a PDB

1. List All PDBs

To see all PDBs in a CDB:

SELECT name, open_mode FROM v$pdbs; 

2. Switch to a PDB

To switch to a specific PDB, e.g., FREEPDB1:

ALTER SESSION SET CONTAINER = FREEPDB1; 

3. Work Inside the PDB

Once connected, all operations will be scoped to the selected PDB.


Summary

A Pluggable Database (PDB) provides a way to manage and consolidate multiple databases within a single Oracle Database instance (CDB). It simplifies database management, reduces costs, and enhances flexibility for operations like migration and resource sharing.

Most popular tags

laravel postgresql laravel-10 replication ha postgresql mongodb laravel-11 mongodb database mongodb tutorial ubuntu 24.04 lts streaming-replication mysql database laravel postgresql backup laravel login register logout database mysql php laravel 11 - login with otp valid for 10 minutes. user and admin registration user and admin login multiauth technlogy asp.net asp.net c# mysql master slave replication centos linux laravel sql server schedule backup autobackup postgresql django python haproxy load balancer install self sign ssl laravel 11 gaurds zabbix 7 how to install graylog on ubuntu 24.04 lts | step-by-step asp.net core mvc .net mvc network upload c# ssl integration sql server on ubuntu 22.04 lts mssql server ms sql server sql server user access in postgres mysql password change cent os linux configure replica laravel 11 socialite login with google account google login kubernetes (k8s) install nginx load balancer install install and configure .net 8.0 in ubuntu 24.04 lts php in iis php with iis php tutorial chirags php tutorials chirags php tutorial chirags tutorial laravel 11 guards mongodb sharding metabase business analytics metabase postgresql 16 to postgresql 17 postgresql migration letsencrypt mongodb crud rocky linux laravel custom captcha laravel 11 captcha laravel captcha mongo dll php.ini debian 12 nginx apache nextcloud gitea in ubuntu git gitea npm error node js mysql ndb cluster mysql cluster ssl oracle login register logout in python debian windows shell batch file bat file time stamp date time shopping cart in laravel centos rhel swap memeory rhel 5.5
...