Wednesday, July 03, 2013

Oracle 12c plugable databases

Last week I downloaded the new Oracle 12c database to check this new feature called 'Plugable database'.
Using the runnstaller I fist created the 12c database with the 'Create as container database' option enabled.












After installing the database, I dicided to use the dbca to create another plugable database.



So, there should be 2 plugable databases and one container database right now.
I checked the datafiles location.
Datafiles are located in this example in /media/oracle_data
cd /media/oracle_data/ORATEST
[oracle@localhost ORATEST]$ ls
controlfile  datafile  E0982A74548A0DF8E0430100007FA928  E098787A3ED20F81E0430100007FFC1B  onlinelog






 The E0... directories are the two plugable database directories. Inside these directories are datafiles that belong to that plugable database. Controlfiles and onlinelog files are not in the plugable database directories, only in the container database directory.
At first the plugable directories only have a users, temp, system and sysaux datafile.

Connect to the database (container)

[oracle@localhost ~]$ . oraenv
ORACLE_SID = [oracle] ? oratest
The Oracle base has been set to /u01/app/oracle
 [oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 3 13:46:34 2013

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
 


SQL> SELECT v.name, v.open_mode, NVL(v.restricted, 'n/a') "RESTRICTED", d.status
  2  FROM v$pdbs v, dba_pdbs d
  3  WHERE v.guid = d.guid
  4  ORDER BY v.create_scn;

NAME                                OPEN_MODE    RES   STATUS
------------------------------   -----------------      ----    ------------
PDB$SEED                       READ  ONLY      NO    NORMAL
PDBORATEST                  READ  WRITE    NO    NORMAL
PLUGDB02                      READ  WRITE    NO    NORMAL



Next step is to connect to a plugable database and create tablespaces for example...


4 comments:

Unknown said...


Nice article i was really impressed by seeing this article, it was very intresting and it is very useful for Oracle Training Learners.. We are Providing best qa online training in worldwide.

Unknown said...
This comment has been removed by the author.
jade said...

Controlfiles and onlinelog files are not in the plugable database directories, only in the container database directory. Proact Financial

j devi pandu ranga raju said...

Spend only daily few hours here we are offering online training class for the following course, like Microsoft. Oracle, sale force, data warehouse, and we also offers free online demo also for more details please visit www.ittrainingsonline.com.