SlideShare a Scribd company logo
Oracle 12c
Multitenant Feature
Overview
• A new option for Oracle Database 12c, Oracle Multitenant helps customers reduce
IT costs by streamlining consolidation, provisioning, upgrades, and more. It is
supported by a new architecture that allows a multitenant container database to
hold many pluggable databases. And it fully balances other options, including Oracle
Real Application Clusters and Oracle Active Data Guard. An existing database can be
simply adopted, with no change, as a pluggable database; and no changes are
needed in the other tiers of the application.
Container & Pluggable Database
• A CDB is very similar to a conventional
Oracle database. It’s main purpose is to
house the data dictionary for those
objects that are owned by the root
container and those that are accessible to
all PDBs. A single CDB can host multiple
PDBs.
• A PDB contains only information
pertaining to itself and hence only has
datafiles and tempfiles. It also has it’s
own data dictionary.
Creating a Container Database (CDB) - OUI
• We can use the Oracle Universal
Installer (OUI) to create a CDB
during the 12c software installation
by checking the “Create as
Container database” option on the
“Typical Installation Screen”. We
also have an option to create a
single PDB at this time.
Creating a Container Database (CDB) - OUI
• We can create a CDB on the
“Database Identifiers” screen as
well.
Creating a Container Database (CDB) - DBCA
• A CDB can be created using the
Database Configuration Assistant
(DBCA) also. The "Creation Mode"
page allows us to enter the default
installation configuration details
directly.
Creating a Container Database (CDB) - DBCA
• If we choose the "Advanced
Mode" option, we can create a
CDB and multiple PBDs in one go.
Creating a Container Database (CDB) – Manual Creation
• We can also create a CDB manually. The following script can be used for the same –
• When the ENABLE PLUGGABLE DATABASE clause is present, the database is created as a CDB with both
root and seed. The SEED FILE_NAME_CONVERT clause is used to determine the seed file names based on
the root file names. We can also specify the seed datafiles explicitly.
• SEED
• SYSTEM DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf' SIZE 700M REUSE
• AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
• EXTENT MANAGEMENT LOCAL
• SYSAUX DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf' SIZE 550M REUSE
• AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
Managing a Pluggable Database (PDB) - DBCA
• On the opening “Database
Operation” screen of DBCA, a
new option has been added
which allows us to manage
pluggable databases of an
existing container database.
Managing a Pluggable Database (PDB) - DBCA
• Resulting screen options.
Creating a Pluggable Database (PDB) - DBCA
• On choosing the first option
“Create a Pluggable Database”
on the last screen, we are asked
to select the Container
Database where the PDB would
be created.
Creating a Pluggable Database (PDB) - DBCA
• The first option “Create a new
Pluggable Database” can be used
to create a fresh PDB. If we want
to plug a previously unplugged
database, then one of the rest
two options, PDB Archive or PDB
File Set, can be used. These
options can be used to match the
format of the files containing the
unplugged PDB.
Creating a Pluggable Database (PDB) - DBCA
• On this screen, we enter the PDB
name, database location and
admin credentials.
Creating a Pluggable Database (PDB) - DBCA
• The new PDB is created as a
clone of the seed database we
created during the Container
Database creation.
Unplugging a Pluggable Database (PDB) - DBCA
• On the "Manage Pluggable
Databases" screen shown
previously, we can select the
"Unplug a Pluggable Database"
option to unplug a PDB. On the
resulting screen, we select the
container database that
houses the pluggable database
to be unplugged.
Unplugging a Pluggable Database (PDB) - DBCA
• After we select the PDB to
unplug, we need to decide
whether to use a pluggable
database archive or file set and
then enter the appropriate
location details.
Creating a Pluggable Database (PDB)
using Archive or File Set - DBCA
• We can select either of the
two options, “Create Pluggable
Database From PDB Archive"
or "Create Pluggable Database
using PDB File Set“ and enter
the location details of the
required files.
Creating a Pluggable Database (PDB)
using Archive or File Set - DBCA
• Here we enter the
pluggable database
name, database
location and admin
credentials.
Deleting a Pluggable Database (PDB) - DBCA
• After choosing the container
database on the “Database
List” screen, we can select the
pluggable database that we
wish to delete from the drop
down list on the resulting
screen.
Configuring a Pluggable Database (PDB) - DBCA
• After choosing the container
database on the “Database
List” screen, we can select the
pluggable database that we
wish to configure from the
drop down list on the
“Pluggable Database List”
screen. On the resulting
“Pluggable Database Options”
screen, we can choose to
configure Label Security.
Creating a Pluggable Database (PDB) - Manually
• To create a new PDB from a seed database, we need to tell Oracle where the file should be placed.
• CONN / AS SYSDBA
• CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb2/');
• Alternatively,
• CONN / AS SYSDBA
• ALTER SESSION SET
PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb3/';
• CREATE PLUGGABLE DATABASE pdb3 ADMIN USER pdb_adm IDENTIFIED BY Password1;
• We can see the PDBs that are present by querying the DBA_PDBS and V$PDBS views.
• SELECT pdb_name, status FROM dba_pdbs ORDER BY pdb_name;
• SELECT name, open_mode FROM v$pdbs ORDER BY name;
• The PDBs are created with the status of ‘NEW’. They must be opened in READ WRITE mode for the integration
with the CDB to be complete.
• ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;
Unplugging a Pluggable Database (PDB) - Manually
• Before unplugging a PDB, we must make sure it is closed.
• ALTER PLUGGABLE DATABASE pdb2 CLOSE;
• ALTER PLUGGABLE DATABASE pdb2 UNPLUG INTO '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml';
• We can delete the PDB, choosing to keep the files on the file system.
• DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES;
Plugging a Pluggable Database (PDB) - Manually
We need to first check if the PDB is compatible with the CDB.
SET SERVEROUTPUT ON
DECLARE
l_result BOOLEAN;
BEGIN
l_result := DBMS_PDB.check_plug_compatibility( pdb_descr_file => '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml',
pdb_name => 'pdb2');
IF l_result THEN
DBMS_OUTPUT.PUT_LINE('compatible');
ELSE
DBMS_OUTPUT.PUT_LINE('incompatible');
END IF;
END;
/
compatible
PL/SQL procedure successfully completed.
CREATE PLUGGABLE DATABASE pdb5 USING '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml'
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb2/','/u01/app/oracle/oradata/cdb1/pdb5/');
Or,
CREATE PLUGGABLE DATABASE pdb2 USING '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml' NOCOPY TEMPFILE REUSE;
ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;
Cloning a Pluggable Database (PDB) - Manually
Cloning an existing local PDB is similar to creating a new PDB from the seed PDB, except that now we would be using a non-seed PDB as
a source.
ALTER PLUGGABLE DATABASE pdb3 CLOSE;
ALTER PLUGGABLE DATABASE pdb3 OPEN READ ONLY;
CREATE PLUGGABLE DATABASE pdb4 FROM pdb3
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb3/','/u01/app/oracle/oradata/cdb1/pdb4/');
ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE;
-- Switch the source PDB back to read/write
ALTER PLUGGABLE DATABASE pdb3 CLOSE;
ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE;
We can also clone from a remote PDB using a database link in the local CBD.
CREATE PLUGGABLE DATABASE pdb5 FROM remote_pdb5@remotecdb1
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/remote_pdb5/','/u01/app/oracle/oradata/cdb1/pdb5/');
ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE;
*This functionality does not work properly in the 12.1.0.1 release of the database.
Deleting a Pluggable Database (PDB) - Manually
When dropping a PDB, we can choose to keep or drop the associated datafiles. The PDBs must be closed before dropping.
ALTER PLUGGABLE DATABASE pdb2 CLOSE;
DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES;
ALTER PLUGGABLE DATABASE pdb3 CLOSE;
DROP PLUGGABLE DATABASE pdb3 INCLUDING DATAFILES;
SELECT name, open_mode FROM v$pdbs ORDER BY name;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 MOUNTED
Oracle Documentation & References
• Oracle Database 12c: Introduction to a Multitenant Environment with Tom Kyte -
http://www.youtube.com/watch?v=2MrouEW9j88&feature=youtu.be
• White Paper - http://www.oracle.com/technetwork/database/multitenant/overview/multitenant-
wp-12c-2078248.pdf
• Data Sheet - http://www.oracle.com/technetwork/database/multitenant-ds-12c-1951720.pdf

More Related Content

What's hot (20)

PPTX
Database Consolidation using Oracle Multitenant
Pini Dibask
 
PPTX
Oracle 12c Multi Tenant
Red Stack Tech
 
PPTX
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
PPTX
Using oracle12c pluggable databases to archive
Secure-24
 
PDF
Plugging in oracle database 12c pluggable databases
Kellyn Pot'Vin-Gorman
 
PPTX
Presentation day4 oracle12c
Pradeep Srivastava
 
PPTX
Oracle 12c
Tank Bhavin
 
PDF
Reduce planned database down time with Oracle technology
Kirill Loifman
 
PPTX
Presentation day5 oracle12c
Pradeep Srivastava
 
PDF
Oracle database 12c intro
pasalapudi
 
PPTX
Presentation day2 oracle12c
Pradeep Srivastava
 
PDF
DBA 101 : Calling all New Database Administrators (WP)
Gustavo Rene Antunez
 
PDF
Oracle 12c New Features_RAC_slides
Saiful
 
PPTX
Presentationday3oracle12c
Pradeep Srivastava
 
PDF
RMAN in 12c: The Next Generation (WP)
Gustavo Rene Antunez
 
PDF
Oracle database high availability solutions
Kirill Loifman
 
PPTX
Oracle 12c Architecture
AmeerpetTrainingOnline
 
PDF
12 Things about Oracle WebLogic Server 12c
Guatemala User Group
 
PDF
How DBAs can garner the power of the Oracle Public Cloud?
Gustavo Rene Antunez
 
PPTX
Why Upgrade to Oracle Database 12c?
DLT Solutions
 
Database Consolidation using Oracle Multitenant
Pini Dibask
 
Oracle 12c Multi Tenant
Red Stack Tech
 
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
Using oracle12c pluggable databases to archive
Secure-24
 
Plugging in oracle database 12c pluggable databases
Kellyn Pot'Vin-Gorman
 
Presentation day4 oracle12c
Pradeep Srivastava
 
Oracle 12c
Tank Bhavin
 
Reduce planned database down time with Oracle technology
Kirill Loifman
 
Presentation day5 oracle12c
Pradeep Srivastava
 
Oracle database 12c intro
pasalapudi
 
Presentation day2 oracle12c
Pradeep Srivastava
 
DBA 101 : Calling all New Database Administrators (WP)
Gustavo Rene Antunez
 
Oracle 12c New Features_RAC_slides
Saiful
 
Presentationday3oracle12c
Pradeep Srivastava
 
RMAN in 12c: The Next Generation (WP)
Gustavo Rene Antunez
 
Oracle database high availability solutions
Kirill Loifman
 
Oracle 12c Architecture
AmeerpetTrainingOnline
 
12 Things about Oracle WebLogic Server 12c
Guatemala User Group
 
How DBAs can garner the power of the Oracle Public Cloud?
Gustavo Rene Antunez
 
Why Upgrade to Oracle Database 12c?
DLT Solutions
 

Viewers also liked (17)

PDF
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Principled Technologies
 
PDF
Introduction to Oracle Clusterware 12c
Guatemala User Group
 
PPTX
Oracle Database 12c Feature Support in Oracle SQL Developer
Jeff Smith
 
PDF
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
PDF
Oracle Database 12c: Новые возможности Oracle 12c
Andrey Akulov
 
PDF
The Top 12 Features new to Oracle 12c
David Yahalom
 
PDF
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Gustavo Rene Antunez
 
PDF
Cognitive Radio Networks for Emergency Communications June 2012
xG Technology, Inc.
 
PPTX
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
PPTX
Oracle Database 11g vs 12c
Deiby Gómez
 
PDF
Oracle 12c New Features for Developers
CompleteITProfessional
 
PPT
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 
PDF
Cognitive Radio for Public Safety Applications September 2012
xG Technology, Inc.
 
PPTX
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
stewashton
 
PPT
Java card technology
Amol Kamble
 
PDF
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
Arun Gupta
 
PPTX
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Alex Zaballa
 
Scaling Oracle 12c database performance with EMC XtremIO storage in a Databas...
Principled Technologies
 
Introduction to Oracle Clusterware 12c
Guatemala User Group
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Jeff Smith
 
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
Oracle Database 12c: Новые возможности Oracle 12c
Andrey Akulov
 
The Top 12 Features new to Oracle 12c
David Yahalom
 
Cosas que “probablemente” no sabes pero deberías de saber en Oracle 12c
Gustavo Rene Antunez
 
Cognitive Radio Networks for Emergency Communications June 2012
xG Technology, Inc.
 
Oracle Database 12c - New Features for Developers and DBAs
Alex Zaballa
 
Oracle Database 11g vs 12c
Deiby Gómez
 
Oracle 12c New Features for Developers
CompleteITProfessional
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 
Cognitive Radio for Public Safety Applications September 2012
xG Technology, Inc.
 
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
stewashton
 
Java card technology
Amol Kamble
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
Arun Gupta
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expr...
Alex Zaballa
 
Ad

Similar to Oracle 12c - Multitenant Feature (20)

PPT
173955573244324324324424322adsadsaasd.ppt
anand90rm
 
PDF
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Ludovico Caldara
 
PDF
Security Multitenant
Arush Jain
 
PDF
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Alex Gorbachev
 
PPT
Oracle12c Pluggable Database Hands On - TROUG 2014
Özgür Umut Vurgun
 
PDF
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Alireza Kamrani
 
PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
PPTX
Eouc 12 on 12c osama mustafa
Osama Mustafa
 
PDF
Migration to Oracle Multitenant
Jitendra Singh
 
PDF
Oracle PDB Failover in a Data Guard environment
Alireza Kamrani
 
PPTX
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
Satishbabu Gunukula
 
PPTX
Simplify Consolidation with Oracle Pluggable Databases
omnidba
 
PDF
OOW 17 - database consolidation using the oracle multitenant architecture
Pini Dibask
 
DOC
Create manula and automaticly database
Anar Godjaev
 
PDF
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Alireza Kamrani
 
PDF
What is new on 12c for Backup and Recovery? Presentation
Francisco Alvarez
 
PDF
What's next after Upgrade to 12c
Guatemala User Group
 
PDF
Exploring Oracle Multitenant in Oracle Database 12c
Zohar Elkayam
 
PDF
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
Trivadis
 
PDF
Pluggable Databases: What they will break and why you should use them anyway!
Guatemala User Group
 
173955573244324324324424322adsadsaasd.ppt
anand90rm
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Ludovico Caldara
 
Security Multitenant
Arush Jain
 
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Alex Gorbachev
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Özgür Umut Vurgun
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Alireza Kamrani
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
Eouc 12 on 12c osama mustafa
Osama Mustafa
 
Migration to Oracle Multitenant
Jitendra Singh
 
Oracle PDB Failover in a Data Guard environment
Alireza Kamrani
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
Satishbabu Gunukula
 
Simplify Consolidation with Oracle Pluggable Databases
omnidba
 
OOW 17 - database consolidation using the oracle multitenant architecture
Pini Dibask
 
Create manula and automaticly database
Anar Godjaev
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Alireza Kamrani
 
What is new on 12c for Backup and Recovery? Presentation
Francisco Alvarez
 
What's next after Upgrade to 12c
Guatemala User Group
 
Exploring Oracle Multitenant in Oracle Database 12c
Zohar Elkayam
 
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
Trivadis
 
Pluggable Databases: What they will break and why you should use them anyway!
Guatemala User Group
 
Ad

Recently uploaded (20)

PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Python basic programing language for automation
DanialHabibi2
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Oracle 12c - Multitenant Feature

  • 2. Overview • A new option for Oracle Database 12c, Oracle Multitenant helps customers reduce IT costs by streamlining consolidation, provisioning, upgrades, and more. It is supported by a new architecture that allows a multitenant container database to hold many pluggable databases. And it fully balances other options, including Oracle Real Application Clusters and Oracle Active Data Guard. An existing database can be simply adopted, with no change, as a pluggable database; and no changes are needed in the other tiers of the application.
  • 3. Container & Pluggable Database • A CDB is very similar to a conventional Oracle database. It’s main purpose is to house the data dictionary for those objects that are owned by the root container and those that are accessible to all PDBs. A single CDB can host multiple PDBs. • A PDB contains only information pertaining to itself and hence only has datafiles and tempfiles. It also has it’s own data dictionary.
  • 4. Creating a Container Database (CDB) - OUI • We can use the Oracle Universal Installer (OUI) to create a CDB during the 12c software installation by checking the “Create as Container database” option on the “Typical Installation Screen”. We also have an option to create a single PDB at this time.
  • 5. Creating a Container Database (CDB) - OUI • We can create a CDB on the “Database Identifiers” screen as well.
  • 6. Creating a Container Database (CDB) - DBCA • A CDB can be created using the Database Configuration Assistant (DBCA) also. The "Creation Mode" page allows us to enter the default installation configuration details directly.
  • 7. Creating a Container Database (CDB) - DBCA • If we choose the "Advanced Mode" option, we can create a CDB and multiple PBDs in one go.
  • 8. Creating a Container Database (CDB) – Manual Creation • We can also create a CDB manually. The following script can be used for the same – • When the ENABLE PLUGGABLE DATABASE clause is present, the database is created as a CDB with both root and seed. The SEED FILE_NAME_CONVERT clause is used to determine the seed file names based on the root file names. We can also specify the seed datafiles explicitly. • SEED • SYSTEM DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf' SIZE 700M REUSE • AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED • EXTENT MANAGEMENT LOCAL • SYSAUX DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf' SIZE 550M REUSE • AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
  • 9. Managing a Pluggable Database (PDB) - DBCA • On the opening “Database Operation” screen of DBCA, a new option has been added which allows us to manage pluggable databases of an existing container database.
  • 10. Managing a Pluggable Database (PDB) - DBCA • Resulting screen options.
  • 11. Creating a Pluggable Database (PDB) - DBCA • On choosing the first option “Create a Pluggable Database” on the last screen, we are asked to select the Container Database where the PDB would be created.
  • 12. Creating a Pluggable Database (PDB) - DBCA • The first option “Create a new Pluggable Database” can be used to create a fresh PDB. If we want to plug a previously unplugged database, then one of the rest two options, PDB Archive or PDB File Set, can be used. These options can be used to match the format of the files containing the unplugged PDB.
  • 13. Creating a Pluggable Database (PDB) - DBCA • On this screen, we enter the PDB name, database location and admin credentials.
  • 14. Creating a Pluggable Database (PDB) - DBCA • The new PDB is created as a clone of the seed database we created during the Container Database creation.
  • 15. Unplugging a Pluggable Database (PDB) - DBCA • On the "Manage Pluggable Databases" screen shown previously, we can select the "Unplug a Pluggable Database" option to unplug a PDB. On the resulting screen, we select the container database that houses the pluggable database to be unplugged.
  • 16. Unplugging a Pluggable Database (PDB) - DBCA • After we select the PDB to unplug, we need to decide whether to use a pluggable database archive or file set and then enter the appropriate location details.
  • 17. Creating a Pluggable Database (PDB) using Archive or File Set - DBCA • We can select either of the two options, “Create Pluggable Database From PDB Archive" or "Create Pluggable Database using PDB File Set“ and enter the location details of the required files.
  • 18. Creating a Pluggable Database (PDB) using Archive or File Set - DBCA • Here we enter the pluggable database name, database location and admin credentials.
  • 19. Deleting a Pluggable Database (PDB) - DBCA • After choosing the container database on the “Database List” screen, we can select the pluggable database that we wish to delete from the drop down list on the resulting screen.
  • 20. Configuring a Pluggable Database (PDB) - DBCA • After choosing the container database on the “Database List” screen, we can select the pluggable database that we wish to configure from the drop down list on the “Pluggable Database List” screen. On the resulting “Pluggable Database Options” screen, we can choose to configure Label Security.
  • 21. Creating a Pluggable Database (PDB) - Manually • To create a new PDB from a seed database, we need to tell Oracle where the file should be placed. • CONN / AS SYSDBA • CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1 FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb2/'); • Alternatively, • CONN / AS SYSDBA • ALTER SESSION SET PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb3/'; • CREATE PLUGGABLE DATABASE pdb3 ADMIN USER pdb_adm IDENTIFIED BY Password1; • We can see the PDBs that are present by querying the DBA_PDBS and V$PDBS views. • SELECT pdb_name, status FROM dba_pdbs ORDER BY pdb_name; • SELECT name, open_mode FROM v$pdbs ORDER BY name; • The PDBs are created with the status of ‘NEW’. They must be opened in READ WRITE mode for the integration with the CDB to be complete. • ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;
  • 22. Unplugging a Pluggable Database (PDB) - Manually • Before unplugging a PDB, we must make sure it is closed. • ALTER PLUGGABLE DATABASE pdb2 CLOSE; • ALTER PLUGGABLE DATABASE pdb2 UNPLUG INTO '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml'; • We can delete the PDB, choosing to keep the files on the file system. • DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES;
  • 23. Plugging a Pluggable Database (PDB) - Manually We need to first check if the PDB is compatible with the CDB. SET SERVEROUTPUT ON DECLARE l_result BOOLEAN; BEGIN l_result := DBMS_PDB.check_plug_compatibility( pdb_descr_file => '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml', pdb_name => 'pdb2'); IF l_result THEN DBMS_OUTPUT.PUT_LINE('compatible'); ELSE DBMS_OUTPUT.PUT_LINE('incompatible'); END IF; END; / compatible PL/SQL procedure successfully completed. CREATE PLUGGABLE DATABASE pdb5 USING '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml' FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb2/','/u01/app/oracle/oradata/cdb1/pdb5/'); Or, CREATE PLUGGABLE DATABASE pdb2 USING '/u01/app/oracle/oradata/cdb1/pdb2/pdb2.xml' NOCOPY TEMPFILE REUSE; ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;
  • 24. Cloning a Pluggable Database (PDB) - Manually Cloning an existing local PDB is similar to creating a new PDB from the seed PDB, except that now we would be using a non-seed PDB as a source. ALTER PLUGGABLE DATABASE pdb3 CLOSE; ALTER PLUGGABLE DATABASE pdb3 OPEN READ ONLY; CREATE PLUGGABLE DATABASE pdb4 FROM pdb3 FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdb3/','/u01/app/oracle/oradata/cdb1/pdb4/'); ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE; -- Switch the source PDB back to read/write ALTER PLUGGABLE DATABASE pdb3 CLOSE; ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE; We can also clone from a remote PDB using a database link in the local CBD. CREATE PLUGGABLE DATABASE pdb5 FROM remote_pdb5@remotecdb1 FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/remote_pdb5/','/u01/app/oracle/oradata/cdb1/pdb5/'); ALTER PLUGGABLE DATABASE pdb4 OPEN READ WRITE; *This functionality does not work properly in the 12.1.0.1 release of the database.
  • 25. Deleting a Pluggable Database (PDB) - Manually When dropping a PDB, we can choose to keep or drop the associated datafiles. The PDBs must be closed before dropping. ALTER PLUGGABLE DATABASE pdb2 CLOSE; DROP PLUGGABLE DATABASE pdb2 KEEP DATAFILES; ALTER PLUGGABLE DATABASE pdb3 CLOSE; DROP PLUGGABLE DATABASE pdb3 INCLUDING DATAFILES; SELECT name, open_mode FROM v$pdbs ORDER BY name; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PDB1 MOUNTED
  • 26. Oracle Documentation & References • Oracle Database 12c: Introduction to a Multitenant Environment with Tom Kyte - http://www.youtube.com/watch?v=2MrouEW9j88&feature=youtu.be • White Paper - http://www.oracle.com/technetwork/database/multitenant/overview/multitenant- wp-12c-2078248.pdf • Data Sheet - http://www.oracle.com/technetwork/database/multitenant-ds-12c-1951720.pdf