Loading...

Create a new pluggable database in Oracle DB

Create (admin) user for new pdb. Set password expiration to none.

SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profil wurde geΣndert.

If you are in the container database use the c## naming.

SQL> CREATE USER c##scott IDENTIFIED BY tiger;
Benutzer wurde erstellt.

Grant the admin privilege to user scott.

SQL> GRANT CONNECT, DBA TO c##scott WITH ADMIN OPTION;
Benutzerzugriff (Grant) wurde erteilt.

List all pluggable databases

SQL> show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO

Create a new pdb from the template db pdbseed

CREATE PLUGGABLE DATABASE fraud ADMIN USER scott IDENTIFIED BY tiger file_name_convert = ('pdbseed', 'fraud');

Switch to the new pdb.

SQL> alter session set container=fraud;
Session wurde geΣndert.

Check the connection name.

SQL> show con_name
CON_NAME
------------------------------
FRAUD