Create Oracle Pluggable Database Manually Using SQL Prompt

We can create a pluggable database in an existing multitenant database either using dbca or manually.


Connect to the container database:(ROOT)

[oracle@localhost ~]$ sqlplus sys/oracle@cdb1 as sysdba

SQL*Plus: Release Production on Sun Aug 23 10:27:08 2015

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

Connected to:

Oracle Database 12c Enterprise Edition Release - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name

While creating PDB if you don’t mention FILE_NAME_CONVERT parameter then below error will come
SQL> create pluggable database dbwr admin user ram identified by ram;
create pluggable database dbwr admin user ram identified by ram                                                                        *
ERROR at line 1:
ORA-65016: FILE_NAME_CONVERT must be specified
Create PDB:(correct command)
SQL> create pluggable database dbwr admin user ram identified by ram FILE_NAME_CONVERT=('/home/oracle/app/oracle/oradata/cdb1/pdbseed','/home/oracle/app/oracle/oradata/cdb1/dbwr');

Pluggable database created.

SQL> select con_id,name,open_mode from v$Pdbs;

CON_ID NAME                OPEN_MODE
----------            -------------------
2 PDB$SEED               READ ONLY
3 ORCL                   READ WRITE
4 DBWR                   MOUNTED
-- Open the PDB
SQL> alter pluggable database dbwr open;

Pluggable database altered.

SQL> select con_id,name,open_mode from v$pdbs; 

CON_ID NAME                      OPEN_MODE
----------                       ----------
2 PDB$SEED                           READ ONLY
3 ORCL                               READ WRITE
4 DBWR                               READ WRITE

SQL> alter session set container=dbwr;

Session altered.

SQL> show con_name


SQL> select file_name from dba_data_files;



Continue reading “Create Oracle Pluggable Database Manually Using SQL Prompt”

Oracle 12c-Multitenant Database Backup Using Rman

With multi tenant feature introduced in oracle 12c, New commands are there for taking rman backup of pluggable database and root container database.

Backup of complete container( ROOT + ALL PDBS )

Taking backup of particular pluggable database:(backup pluggable database PDB5)

Backup of tablespace of pluggable database

Catch Me On:- Hariprasath Rajaram 

Telegram: LinkedIn: Facebook:                       FB Group:                   FB Page: Twitter: