Tuesday, April 29, 2025

How to create pluggable database in oracle ?

 create pluggable database in oracle 




SQL> show con_name 


CON_NAME

------------------------------

CDB$ROOT

SQL> 


SQL> show pdbs


    CON_ID CON_NAME   OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED   READ ONLY  NO

3 PDB   READ WRITE NO

SQL> 

SQL> 

SQL> 

SQL> 




SQL> create pluggable database demo1 admin user demo1 identified by demo1

  2  file_name_convert=('/u01/app/oracle/oradata/DB1/pdbseed','/u01/app/oracle/oradata/demo1');   


Pluggable database created.


SQL> show pdbs


    CON_ID CON_NAME   OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED   READ ONLY  NO

3 PDB   READ WRITE NO

4 DEMO1   MOUNTED






SQL> alter pluggable database demo1 open read write;


Pluggable database altered.


SQL> show pdbs


    CON_ID CON_NAME   OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED   READ ONLY  NO

3 PDB   READ WRITE NO

4 DEMO1   READ WRITE NO

SQL> 



SQL> 

SQL>       

SQL> alter session set container=demo1;


Session altered.


SQL> show con_name 


CON_NAME

------------------------------

DEMO1

SQL> 



SQL> 

SQL> 

SQL> select name from v$pdbs;


NAME

--------------------

DEMO1


SQL> 



No comments:

Post a Comment

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Oracle Database Deep Health Check Checklist

Oracle Database Deep Health Check Checklist Recommended assessment levels Level Purpose Typical scope L1 Operational health Availability, sp...