How to create PDB Database in 19c

Summary 

Create a PDB from the seed PDB

Verify the status, open mode, and service names of the PDBs

List the PDB data files.

 

Create a PDB from the seed PDB

 

Syntax:-

 

create pluggable database <PDB_NMAE> admin user <Admin_Username> identified by <Password>;

 

[oracle@oraclelab1 ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Sep 24 08:56:57 2022

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL> show pdbs

 

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 TESTPDB                        READ WRITE NO

 

SQL> create pluggable database DEVPDB admin user sanjeev identified by dba;

 

Pluggable database created.



Verify the status, open mode, and service names of the PDBs

 

SQL> select pdb_name, status from cdb_pdbs;

 

PDB_NAME                              STATUS

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

TESTPDB                                    NORMAL

PDB$SEED                                 NORMAL

DEVPDB                                     NEW

 

 

SQL> alter pluggable database DEVPDB open;

 

Pluggable database altered.

 

SQL> show pdbs

 

    CON_ID CON_NAME        OPEN MODE  RESTRICTED

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

         2 PDB$SEED                     READ ONLY  NO

         3 TESTPDB                        READ WRITE NO

         4 DEVPDB                         READ WRITE NO



List the PDB data files

 

SQL> select name, con_id from v$active_services order by 1;

 

NAME                                                          CON_ID

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

SYS$BACKGROUND                                         1

SYS$USERS                                                        1

TESTCDB                                                            1

TESTCDBXDB                                                     1

devpdb                                                               4

testpdb                                                               3

 

6 rows selected.

 

SQL> select name from v$datafile where con_id=4;

 

NAME

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

+DATA/TESTCDB/E964E17C388124F8E0530F01A8C0A95A/DATAFILE/system.288.1116233981

+DATA/TESTCDB/E964E17C388124F8E0530F01A8C0A95A/DATAFILE/sysaux.289.1116233981

+DATA/TESTCDB/E964E17C388124F8E0530F01A8C0A95A/DATAFILE/undotbs1.290.1116233981

 

SQL>



Reference:

 

Oracle Multitenant: Frequently Asked Questions (Doc ID 1511619.1)


https://docs.oracle.com/en/database/oracle/oracle-database/19/multi/creating-a-pdb-from-scratch.html#GUID-534B3B1D-0ED7-4828-9CA4-B1757398801F

Comments

Popular posts from this blog

How to troubleshoot long running concurrent request in R12.2

How to run Gather Schema Statistics in R12.2

How to clear weblogic stuck threads in R12.2