Skip to main content

Create Oracle 12c Database using DBCA - 12c Container Database & pluggable Database

In this article I am going to test new options introduced in Oracle Database 12cR1. Oracle introduced 2 new  type of databases  in this release "Container Database" and "Pluggable Database". This is one of the major new change introduced from this release. I believe for this feature only Oracle has changed the naming convention of its release from letter "g" to "c" as this feature is completely compatible with the concept what we call as a "CLOUD".

Here I am going to demonstrate the following points:

  •  Container Database & pluggable Database
  •  Using DBCA to create container database
  •  Using DBCA to create pluggable database
  •  Managing pluggable database
Container Database & Plug gable Database:

 - Container database is the root database to which all pluggable database belongs. Here Oracle used same concept as of Solaris Zones. There will be two types of zones in solaris Global zone and non-global zone. Global zone is the main OS and all OS created on top of thsi global zone is known as non-global zone.

Same concept here, CDB is the main database like global zone to which all pluggable databases can attached like non global zone.

Note:

- Pluggable database can be created only in a container database.
- In 12c DBA there are much new options introduced with completely new interface.

Using DBCA to create container database:

- Set proper display variable and execute dbca.




- Select check box "create as Container Database" and also provide a name pluggable database.















Creation of container database "CDB" and Pluggable database "PDB1" completed.

Now i will create another pluggable database in CDB using DBCA.

Using DBCA to create container database:

- set proper display variable and execute dbca


- Select "Manage Pluggable Databses"


- Select "Create a Pluggable Database" 


- Select a container database in which you want to create a pluggable database. Here i have selected "CDB"



- Here you can sepecify other location for creating PDB2 datafiles.








Creation of pluggable datbase "PDB2" completed successfully.

Managing Pluggable database:

Check the status of pluggable database:



ora12c@linux1 ~]$ echo $ORACLE_SID
CDB

[ora12c@linux1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 30 08:13:42 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, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           READ WRITE
PDB2                           READ WRITE

SQL> 



Connecting to a pluggable database:

- connecting to PDB1 & PDB2


[ora12c@linux1 ~]$ sqlplus  system@PDB1

SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 30 08:18:49 2013

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

Enter password: 
Last Successful login time: Sun Jun 30 2013 06:44:22 -04:00

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

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB1                           READ WRITE

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DBDATA/CDB/DATAFILE/undotbs1.259.819429793
+DBDATA/CDB/E05B13C778DA75D3E0430100007F792D/DATAFILE/system.273.819430191
+DBDATA/CDB/E05B13C778DA75D3E0430100007F792D/DATAFILE/sysaux.274.819430191
+DBDATA/CDB/E05B13C778DA75D3E0430100007F792D/DATAFILE/users.276.819430235

SQL> connect system@PDB2
Enter password: 
Connected.
SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB2                           READ WRITE

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DBDATA/CDB/DATAFILE/undotbs1.259.819429793
+DBDATA/CDB/E05D8F42221C2D78E0430100007F4DDF/DATAFILE/system.277.819440853
+DBDATA/CDB/E05D8F42221C2D78E0430100007F4DDF/DATAFILE/sysaux.278.819440861
+DBDATA/CDB/E05D8F42221C2D78E0430100007F4DDF/DATAFILE/users.280.819440897

SQL> 


Open and close pluggable database:


[ora12c@linux1 ~]$ echo $ORACLE_SID
CDB
[ora12c@linux1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 30 08:13:42 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, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           READ WRITE
PDB2                           READ WRITE

SQL> alter pluggable database pdb1 close;

Pluggable database altered.

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           MOUNTED
PDB2                           READ WRITE

SQL> alter pluggable database pdb1 open;

Pluggable database altered.

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           READ WRITE
PDB2                           READ WRITE

SQL> alter pluggable database all close;

Pluggable database altered.

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           MOUNTED
PDB2                           MOUNTED


SQL> alter pluggable database all open;

Pluggable database altered.

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           READ WRITE
PDB2                           READ WRITE

SQL> 

 
Hope this article gives you an overview of Multitanent database feature.

Thanks for reading.

regards,
 X A H E E R

Comments

Anonymous said…
Thanks Sir,
by www.oracle786.com

Popular posts from this blog

Disable Firewall on Oracle Linux 8

In this blogpost we will see how we can stop/disable the firewall on Oracle Linux 8, the firewall command is same in both linux 7 an linux 8. The below listed is the procedure for stopping and disabling the  firewall on Oracle Linux 8. - Here we can see the firewall deamon in active state - Here when we stop the firewall in previous command, now the firewall daemon is dead - For permanent disabling the firewall on server, we can use "disable" option The following commands will be helpful: #systemctl status firewalld #systemctl stop firewalld #systemctl disable firewalld #systemctl enable firewalld #systemctl start firewalld Hope it helps !! Thanks for reading :) regards, X A H E E R

Enable Desktop on Oracle Solaris 11.4

Oracle Solaris 11 installation has multiple options to choose for installation of an Operating Environment, but mostly Oracle Solaris text install media is used and this installation media doesn't offer the GUI Desktop Environment by default after the installation. This blog post will explain how we can enable the desktop for Oracle Solaris 11.4 operating system, after the completion of installation. We have to install "solaris-desktop" package and reboot the machine and GUI desktop will be enabled for the Operating System. In this blog post my virtual machine is connected to the internet and hence I am able to use available pupblic repository for package installation, if in case internet is not available for the server/machine then we have configure the local/Server  repository for the installation. Follow the below steps for desktop package installation: After installation of dekstop package we are now able to login with GUI desktop environment

Oracle Applications R12.2 Installation on Linux using virtual box

Oracle E-Business suite R12.2 is released a month ago. I received too many requests from my followers to demonstrate this Installation. This is a step by step detailed article for Installing Oracle E-business suite R12,2 on Oracle Enterprise Linux 5.7 (64-bit). I've used oracle virtual box for Installing Linux. Note:  This Installation is demonstrated on virtual machine with 8GB RAM and Installation completed in 7 hours. I am not sure whether this Installation will work with less than this .  My Virtual Machine configuration: CPU    = 1 core RAM   = 8 GB HDD   =  380 GB Software's Required: 1) Oracle Virtual Box 2) Oracle Enterprise Linux 5.7 (64-bit) 3) Oracle E-Business suite R12.2 for LinuxX86-64-bit Installation Steps: Hardware requirements Create virtual machine and Install operating system Operating System pre-requisites Prepare Stage Area Install Oracle EBS R12.2 software Verify Installation 1. Hardware Requirement