Create Oracle Pluggable Database Manually Using SQL Prompt

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

STEPS:

Connect to the container database:(ROOT)

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

SQL*Plus: Release 12.1.0.2.0 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 12.1.0.2.0 - 64bit Production

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

SQL> show con_name

CON_NAME
-----------
CDB$ROOT
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

CON_NAME
-------------
DBWR

SQL> select file_name from dba_data_files;

FILE_NAME
----------------------------------------------
/home/oracle/app/oracle/oradata/cdb1/dbwr/system01.dbf
/home/oracle/app/oracle/oradata/cdb1/dbwr/sysaux01.dbf

SQL>

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:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/ Facebook:https://www.facebook.com/HariPrasathdba                       FB Group:https://www.facebook.com/groups/894402327369506/                   FB Page: https://www.facebook.com/dbahariprasath/? Twitter: https://twitter.com/hariprasathdba