How to create a Pluggable Database in Oracle 19c using dbca

How to create a new Pluggable Database in Oracle 19c using dbca.- In this article we will explain about How to create a Pluggable Database in Oracle 19c using dbca. From Oracle 12c oracle started Multitenant Architecture. In multitenant architecture you could create multiple PDBs and PDBs are created in CDB.

Before we create a pdb you required to create a CDB first and make sure your CDB is in read write mode.

Current CDB and PDB Database status:

SQL> select name, database_role, open_mode from v$database;

NAME      DATABASE_ROLE    OPEN_MODE
--------- ---------------- --------------------
ORCL      PRIMARY          READ WRITE

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
SQL>
SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL>

Run dbca and select Manage Pluggable databases option:

Choose Create a Pluggable database:

Select the CDB and enter SYS user name and password:

Create Pluggable Database:

Choose Create a new Pluggable database from another PDB option and click on next.

Pluggable Database Identification Options:

Enter new PDB name, Administrator username and Administrator password.

Pluggable Database Options:

Check PDB storage options for PDB datafiles.

Summary:

Check summary details and click on Finish.

Pluggable Database creation is in progress:

Pluggable Database creation is finished:

Check created PDB’s status:

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO
         4 PDB_NEW                        READ WRITE NO
SQL>
SQL> alter session set container=PDB_NEW;

Session altered.

SQL>
SQL> show con_name

CON_NAME
------------------------------
PDB_NEW
SQL>
SQL> select name, pdb, con_id from v$services;

NAME                           PDB                                CON_ID
------------------------------ ------------------------------ ----------
pdb_new                        PDB_NEW                                 4

SQL>

Add newly created PDB’s entry in tnsnames.ora file.

PDB_NEW =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = primary.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb_new)
    )
  )

[oracle@primary ~]$ tnsping PDB_NEW

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 16-JUL-2023 20:56:47

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = primary.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb_new)))
OK (0 msec)
[oracle@primary ~]$ 
[oracle@primary ~]$
[oracle@primary ~]$ sqlplus sys@PDB_NEW as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 16 23:48:16 2023
Version 19.3.0.0.0

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

Enter password:

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL>
SQL> show con_name

CON_NAME
------------------------------
PDB_NEW

SQL>

How to create a Container Database in Oracle

Transparent Data Encryption (TDE) in Oracle

I hope my written content will helped you. Your suggestions/feedback are most welcome from orakldba.com.
Keep learning… Have a great day!!!
Please comment here for your any query related to above content. You can write to mail me through : orakldba@gmail.com.

1 thought on “How to create a Pluggable Database in Oracle 19c using dbca”

Leave a Comment