We will cretae pluggable database using pdb file set.
Unplug database and create pdb file set:
SYS@ORCL19 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PLUG19 MOUNTED
4 ORCL11 READ WRITE NO
5 PLUG19_3 READ WRITE NO
[ORCL19 oramni@exhdbadm01:~]> dbca -silent -unplugDatabase -archiveType RMAN -pdbBackUpfile /tmp/plug19_3/plug19_3.bkp -pdbMetadataFile /tmp/plug19_3/plug19_3.xml -sourceDB ORCL19 -pdbName PLUG19_3
Prepare for db operation
20% complete
Gathering information from the pluggable database
24% complete
40% complete
Unplugging Database
52% complete
58% complete
70% complete
88% complete
94% complete
100% complete
Pluggable database "PLUG19_3" unplugged successfully.
DB is unluged:
SYS@ORCL19 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PLUG19 MOUNTED
4 ORCL11 READ WRITE NO
SYS@ORCL19 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PLUG19 MOUNTED
4 ORCL11 READ WRITE NO
5 PLUG19_3 READ WRITE NO
[ORCL19 oramni@exhdbadm01:~]> dbca -silent -unplugDatabase -archiveType RMAN -pdbBackUpfile /tmp/plug19_3/plug19_3.bkp -pdbMetadataFile /tmp/plug19_3/plug19_3.xml -sourceDB ORCL19 -pdbName PLUG19_3
Prepare for db operation
20% complete
Gathering information from the pluggable database
24% complete
40% complete
Unplugging Database
52% complete
58% complete
70% complete
88% complete
94% complete
100% complete
Pluggable database "PLUG19_3" unplugged successfully.
DB is unluged:
SYS@ORCL19 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PLUG19 MOUNTED
4 ORCL11 READ WRITE NO
Create new pluggable datbase using the pdb file set
[ORCL19 oramni@exhdbadm01:~]> dbca -silent -createPluggableDatabase -pdbName PLUG19_4 -sourceDB ORCL19 -createPDBFrom RMANBACKUP -pdbBackUpfile /tmp/plug19_3/plug19_3.bkp -pdbMetadataFile /tmp/plug19_3/plug19_3.xml -createNewPDBAdminUser -pdbAdminUserName adm -pdbAdminPassword oracle1
[WARNING] [DBT-06208] The 'PDB Admin Password' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
13% complete
Creating Pluggable Database
15% complete
19% complete
23% complete
31% complete
39% complete
53% complete
Completing Pluggable Database Creation
60% complete
Executing Post Configuration Actions
100% complete
Pluggable database "PLUG19_4" plugged successfully.
Look at the log file "/oracle/oramni/cfgtoollogs/dbca/ORCL19/PLUG19_4/ORCL19.log" for further details.
Check the status of the database:
SYS@ORCL19 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PLUG19 MOUNTED
4 ORCL11 READ WRITE NO
5 PLUG19_4 READ WRITE NO
[ORCL19 oramni@exhdbadm01:~]> dbca -silent -createPluggableDatabase -pdbName PLUG19_4 -sourceDB ORCL19 -createPDBFrom RMANBACKUP -pdbBackUpfile /tmp/plug19_3/plug19_3.bkp -pdbMetadataFile /tmp/plug19_3/plug19_3.xml -createNewPDBAdminUser -pdbAdminUserName adm -pdbAdminPassword oracle1
[WARNING] [DBT-06208] The 'PDB Admin Password' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
13% complete
Creating Pluggable Database
15% complete
19% complete
23% complete
31% complete
39% complete
53% complete
Completing Pluggable Database Creation
60% complete
Executing Post Configuration Actions
100% complete
Pluggable database "PLUG19_4" plugged successfully.
Look at the log file "/oracle/oramni/cfgtoollogs/dbca/ORCL19/PLUG19_4/ORCL19.log" for further details.
Check the status of the database:
SYS@ORCL19 SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PLUG19 MOUNTED
4 ORCL11 READ WRITE NO
5 PLUG19_4 READ WRITE NO