Manual Creation and Drop of Pluggable Database - Oracle 12c & 19c

Manual Creation and Drop of Pluggable Database - Oracle 12c & 19c


With latest Oracle database version 12c onwards, Database creation and drop time have has been reduced significantly.

In this blog, We will show how pluggable database can be created with in few mins. 

Manual Pluggable database creation:

Check the existing and Seed pluggable database using below query:

sql>SET SERVEROUTPUT ON
sql>C
OLUMN "RESTRICTED" FORMAT A10
sql>
select v.name, v.open_mode, nvl(v.restricted, 'n/a') "RESTRICTED", d.status  from v$PDBs v inner join dba_pdbs d using (GUID) order by v.create_scn;

sql>

NAME                           OPEN_MODE  RESTRICTED STATUS

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

PDB$SEED                       READ ONLY  NO         NORMAL

PSEEDDB                        READ WRITE NO         NORMAL


Create Pluggable database, using below command:

SQL> create pluggable database c01p01p
admin user app_Admin identified by pwd
file_name_convert = ('/pdbseed/', '/c01p01p/')  ;

Pluggable database created.

Open pluggable database using below command:

alter pluggable database c01p01p open;













Datafile of the database created:


















Manual Pluggable database Drop:

You can drop the PDB using a simple command. As DBAs are familiar with database commands, this command should NOT be a surprise. The syntaxes are fully in-line with existing syntaxes. 

Close Pluggable database using below command:

alter pluggable database c01p01p close;

Drop Pluggable database using command:
drop pluggable database c01p01p including datafiles;

























Please read below books in order to know more about oracle CDB and PDB databases:

========================================================================

You can also , Visit our Blogs for related topic on Pluggable and Container Database:
2)How to clone Pluggable Database from one container to different Container Database

Comments

Popular posts from this blog

Restore MySQL Database from mysqlbackup

Oracle 19c New Features

Install & Configure MySQL Router - MySQL InnoDB Cluster