SlideShare a Scribd company logo
1 of 18
Download to read offline
ORACLE 12C PLUGGABLE DATABASE
FEATURE INSIGHTS

DOAG 21/02/2013
Kirill Loifman
Oracle Certified Professional DBA
www: dadbm.com
Twitter: @loifmkir
ORACLE 12C PLUGGABLE DATABASE (PDB)
•

Native support for Cloud Computing
=> great help in database consolidation

•

Fundamental architectural change
=> true for Oracle DB

•

Feature that I’ve been waiting a decade
12c Pluggable Database

Footer 14/03/2012

2
12C PDB ARCHITECTURE & FEATURES
• Many Pluggable Databases (PDBs) inside a single container
database (CDB)

• PDB is backwards compatible with an ordinary pre-12.1
database
• PDB namespaces are entirely independent of one another
• A session sees only the single PDB it connects to
• Unplug a PDB from one CDB and plug it into another CDB
• Clone a PDB, both within the same CDB or from one CDB to
another one
• The operations on PDBs are implemented as SQL statements
• CDB’s administrator executes these operations when
connected to a CDB
• All PDBs can be backed up at once, but recovered separately
• PDB is transparent to applications

14/03/2012

3
12C PLUGGABLE DATABASE BENEFITS
• Consolidate many PDBs onto a single platform
• Fast provisioning of a new PDB or of a clone of
an existing PDB
• Fast redeployment, by unplug and plug, of an
existing database to a new platform
• Patch or upgrade the Oracle Database version
for many PDBs quickly by doing it just once
• Patch or upgrade a single PDB by unplugging
it and plugging it into a different CDB at a later
version
• Separation of the content of one PDB from
that of peer PDBs in the same CDB
• Separation of the duties of the application
administrators of these PDBs

• Conventional non-CDB database mode is still available in
Oracle 12c
• More efficient in terms of resource consumption,
scalability and manageability
• Based on Oracle show case, PDBs consume 6 times less
hardware resources and are 5 times more scalable
Footer 14/03/2012

4
ORACLE VS OTHERS
Oracle before-12c database

SQL Server 2000

* Encapsulation of instances, databases, schemas and objects

Oracle 12c & SQL Server 2005

Footer 14/03/2012

5
12C PLUGGABLE DATABASE DETAILS
• Each PDB has its own private data dictionary for customer-created database objects;
CDB has the data dictionary for the Oracle-supplied system;
Each data dictionary defines its own namespace.

• There is a new split data dictionary architecture that allows a PDB to be quickly unplugged from one
CDB and plugged into a different CDB
• Each PDB sees a read-only definition of the Oracle-supplied system
• There are global database initialization parameters on CDB level and local PDB ones.
PDB parameters belong only to a particular PDB and will be persistent even after you unplug you PDB.
• Database users can be global (CDB) or local (PDB only).
If a new user created in CDB it’s seen also in PDB.
In case of creation of a user on PDB level it will stay local.
Footer 14/03/2012

6
12C PLUGGABLE DATABASE DETAILS (CONTINUE)
• Temporary tablespaces can be global or local
• Redo logs and Undo tablespace are only global (on CDB level)
• Data Guard acts on the CDB as a whole
• RMAN scheduled backups are done for the CDB as a whole;
you can back up and recover a selected PDB whenever you want to
• An application connects, with no code changes, to a PDB; the system administrator connects to the
CDB; the service named in the connect string specifies the destination DB

• One PDB knows nothing of the other PDBs within the same CDB; each PDB is a hermetically sealed
container. That ensures new level of DB independence and robust security
Footer 14/03/2012

7
HANDS-ON LAB : PREPARATION
• Hands-on Lab databases (12.1 Beta2)
12c Container DB 1 (CDB1): /u01/app/oracle/oradata/cdb1
12c Container DB 2 (CDB2): /u01/app/oracle/oradata/cdb2
12c Non-Container DB (nonCDB): /u01/app/oracle/oradata/noncdb
• SQL*Plus Database Connection examples
-- connect to a CDB (container called CDB$Root) :
connect sys/pass@localhost:1521/cdb1 as sysdba
-- connect to a PDB (container My_PDB):
connect scott/pass@localhost:1521/My_PDB
• Discover the current container
select Sys_Context('Userenv', 'Con_Name') "current container" from dual;
SQL+> show Con_Name
Footer 14/03/2012

8
LAB 1: CREATE AND OPEN A PDB
• Connect to a Container Database (CDB)
sqlplus sys/pass@localhost:1521/cdb1 as sysdba

• Create a new Oracle 12c Pluggable Database (PDB) (by cloning PDB$Seed template)
create pluggable database My_PDB
admin user App_Admin identified by password
file_name_convert = ('/pdbseed/', '/my_pdb/');

• Open PDB
alter pluggable database My_PDB open;
• Verify the PDB datafiles
select Con_ID, Tablespace_Name, File_Name from CDB_Data_Files
where File_Name like '%/cdb1/pdbseed/%‘ or File_Name like '%/cdb1/my_pdb/%‘;
CON_ID
-----2
2
3
3

Tablespace_Name
-----------SYSAUX
SYSTEM
SYSAUX
SYSTEM

File_Name
------------------------------------------------/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf
/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf
/u01/app/oracle/oradata/cdb1/My_PDB/sysaux01.dbf
/u01/app/oracle/oradata/cdb1/My_PDB/system01.dbf

Footer 14/03/2012

9
LAB 2: SETTING OPEN_MODE FOR A PDB / DROP PDB
• Each PDB within a CDB has its own Open_Mode and Restricted status
select Name, Open_Mode, Restricted, Inst_ID from gv$PDBs;
Open_Mode= MOUNTED | READ ONLY | READ WRITE / Restricted = Yes | No | Null

• Starting an instance (which opens the entire CDB) does not cause PDBs to be opened
sqlplus sys/pass@localhost:1521/cdb1 as sysdba

startup
alter pluggable database all open;
…
alter pluggable database all close;
• Drop a PDB
alter pluggable database MY_PDB close immediate;
drop pluggable database MY_PDB including datafiles';
Footer 14/03/2012

10
LAB 3: CLONE AN EXISTING PDB
• Switch a PDB to READ ONLY mode before cloning (online mode will come)
alter pluggable database My_PDB close;
alter pluggable database My_PDB open read only;

create pluggable database My_Clone from My_PDB
file_name_convert = ('/my_pdb/', '/my_clone/');
alter pluggable database My_PDB close;
alter pluggable database My_PDB open;
alter pluggable database My_Clone open;
• Verify CDB data files
select Con_ID, File_Name from CDB_Data_Files;

Footer 14/03/2012

11
LAB 4: UNPLUG PDB FROM CDB1
• Unplug MY_PDB
alter pluggable database My_PDB close;
alter pluggable database My_PDB
unplug into '/u01/app/oracle/oradata/cdb1/my_pdb/my_pdb.xml‘;
• Backup UNPLUGGED MY_PDB with RMAN (if required)
• Drop PDB – remove it from CDB catalog
drop pluggable database My_PDB;
-- or preserve data files for later PDB plug-in operation:

drop pluggable database My_PDB keep datafiles;
Footer 14/03/2012

12
LAB 5: PLUG PDB INTO CDB2
• Connect to cdb2 (/u01/app/oracle/oradata/cdb2)
sqlplus sys/pass@localhost:1521/cdb2 as sysdba;
• Compatibility Check ( error if NOT compatible )
exec DBMS_PDB.Check_Plug_Compatibility(
PDB_Descr_File =>'/u01/app/oracle/oradata/cdb1/my_pdb/my_pdb.xml')
• Plug In My_PDB

create pluggable database My_PDB
using '/u01/app/oracle/oradata/cdb1/my_pdb/my_pdb.xml‘
move file_name_convert = ('/cdb1/', '/cdb2/');
alter pluggable database My_PDB open;

Footer 14/03/2012

13
LAB 6: CREATE PDB AS A CLONE OF AN UNPLUGGED PDB
• Clone From Sample_Schemas “Gold Image”
create pluggable database Sample_Schemas_1 as clone
using
'/u01/app/oracle/oradata/gold_pdbs/sample_schemas/sample_schemas.xml‘
copy
file_name_convert =
('/gold_pdbs/sample_schemas/', '/cdb1/sample_schemas_1/');
alter pluggable database Sample_Schemas_1 open;
• Show PDB GUID
select PDB_Name, GUID
from DBA_PDBs
order by Creation_scn;
Footer 14/03/2012

14
LAB 7: ADOPTING NON-CDB AS A PDB INTO EXISTING CDB
• Upgrade your existing database into a 12.1 non-CDB

• Generate the xml manifest file of nonCDB
shutdown immediate
startup mount
alter database open read only;
begin
DBMS_PDB.Describe(PDB_Descr_File => '/u01/app/oracle/oradata/noncdb/noncdb.xml');
end;
/

shutdown immediate
• Connect to CDB1
sqlplus sys/pass@localhost:1521/cdb1 as sysdba

Footer 14/03/2012

15
LAB 7: CONTINUE
• Plug in the datafiles of nonCDB into CDB1
create pluggable database ExNonCDB as clone
using '/u01/app/oracle/oradata/noncdb/noncdb.xml‘
source_file_name_convert = none
copy file_name_convert = ('/noncdb/', '/cdb1/exnoncdb/')
storage unlimited;
• Open it, to finalize the plug-in, close it, and re-open it Restricted mode
alter pluggable database ExNonCDB open;
alter pluggable database ExNonCDB close;
alter pluggable database ExNonCDB open restricted;
• Remove not required data from the PDB local data dictionary
alter session set container = ExNonCDB;
@?/rdbms/admin/noncdb_to_pdb.sql
• Open the newly-adoped PDB (former non-CDB)
alter pluggable database ExNonCDB open;
Footer 14/03/2012

16
ORACLE 12C CDB / PDB CHARACTERISTICS
•

CDB

PDB

DB name example

cdb1

MY_PDB

Containter name

CDB$Root

MY_PDB

Service name

cdb1

MY_PDB

Tablespaces

system, sysaux, temp, undo

system, sysaux, (temp is possible)

Redo logs

Yes

No

Data Dictionary

Own global

Own local

PDB Template

PDB$Seed

PDB manifest

XML file

Footer 14/03/2012

17
???
THANK YOU!
Kirill Loifman
www.dadbm.com

More Related Content

What's hot

MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMarkus Michalewicz
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecturenaderattia
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1Satishbabu Gunukula
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on ExadataAnil Nair
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)Satishbabu Gunukula
 
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion EditionOracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion EditionMarkus Michalewicz
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACMarkus Michalewicz
 
Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil Nair
 
Oracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACOracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACMarkus Michalewicz
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slidesMohamed Farouk
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsGokhan Atil
 
Active dataguard
Active dataguardActive dataguard
Active dataguardManoj Kumar
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cSatishbabu Gunukula
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESLudovico Caldara
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19cMaria Colgan
 
How to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsHow to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsSandesh Rao
 
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...Sandesh Rao
 

What's hot (20)

Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
 
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion EditionOracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
 
Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016Anil nair rac_internals_sangam_2016
Anil nair rac_internals_sangam_2016
 
Oracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACOracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RAC
 
Oracle RAC 12c Overview
Oracle RAC 12c OverviewOracle RAC 12c Overview
Oracle RAC 12c Overview
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAs
 
Active dataguard
Active dataguardActive dataguard
Active dataguard
 
Oracle ASM Training
Oracle ASM TrainingOracle ASM Training
Oracle ASM Training
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19c
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
How to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsHow to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata Environments
 
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
AIOUG : OTNYathra - Troubleshooting and Diagnosing Oracle Database 12.2 and O...
 

Viewers also liked

Reduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technologyReduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technologyKirill Loifman
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesGustavo Rene Antunez
 
Oracle database high availability solutions
Oracle database high availability solutionsOracle database high availability solutions
Oracle database high availability solutionsKirill Loifman
 
Database Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantPini Dibask
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperOracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperJeff Smith
 
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your CloudExploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your Clouddyahalom
 
The Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12cThe Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12cDavid Yahalom
 
Cognitive Radio Networks for Emergency Communications June 2012
Cognitive Radio Networks for Emergency Communications June 2012Cognitive Radio Networks for Emergency Communications June 2012
Cognitive Radio Networks for Emergency Communications June 2012xG Technology, Inc.
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?DLT Solutions
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Toronto-Oracle-Users-Group
 
Cognitive Radio for Public Safety Applications September 2012
Cognitive Radio for Public Safety Applications September 2012Cognitive Radio for Public Safety Applications September 2012
Cognitive Radio for Public Safety Applications September 2012xG Technology, Inc.
 
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14stewashton
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012Arun Gupta
 
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 versionOracle RAC 12c Collaborate Best Practices - IOUG 2014 version
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 versionMarkus Michalewicz
 
Mobile WiMAX
Mobile WiMAXMobile WiMAX
Mobile WiMAXxotspot
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresRemote DBA Services
 

Viewers also liked (20)

Reduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technologyReduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technology
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
 
Oracle database high availability solutions
Oracle database high availability solutionsOracle database high availability solutions
Oracle database high availability solutions
 
Database Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle Multitenant
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL DeveloperOracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL Developer
 
Oracle 12c - Multitenant Feature
Oracle 12c - Multitenant FeatureOracle 12c - Multitenant Feature
Oracle 12c - Multitenant Feature
 
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your CloudExploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your Cloud
 
The Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12cThe Top 12 Features new to Oracle 12c
The Top 12 Features new to Oracle 12c
 
Cognitive Radio Networks for Emergency Communications June 2012
Cognitive Radio Networks for Emergency Communications June 2012Cognitive Radio Networks for Emergency Communications June 2012
Cognitive Radio Networks for Emergency Communications June 2012
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle 12c Architecture
Oracle 12c ArchitectureOracle 12c Architecture
Oracle 12c Architecture
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
 
Cognitive Radio for Public Safety Applications September 2012
Cognitive Radio for Public Safety Applications September 2012Cognitive Radio for Public Safety Applications September 2012
Cognitive Radio for Public Safety Applications September 2012
 
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
Row Pattern Matching 12c MATCH_RECOGNIZE OOW14
 
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
 
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 versionOracle RAC 12c Collaborate Best Practices - IOUG 2014 version
Oracle RAC 12c Collaborate Best Practices - IOUG 2014 version
 
Mobile WiMAX
Mobile WiMAXMobile WiMAX
Mobile WiMAX
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
Oracle 12c New Features
Oracle 12c New FeaturesOracle 12c New Features
Oracle 12c New Features
 

Similar to Oracle 12c PDB insights

Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intropasalapudi
 
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Alex Gorbachev
 
OOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architectureOOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architecturePini Dibask
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Ludovico Caldara
 
RMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle MultitenantRMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle MultitenantPini Dibask
 
Simplify Consolidation with Oracle Pluggable Databases
Simplify Consolidation with Oracle Pluggable DatabasesSimplify Consolidation with Oracle Pluggable Databases
Simplify Consolidation with Oracle Pluggable Databasesomnidba
 
Winning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle MultitenantWinning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle MultitenantPini Dibask
 
OUGN winning performnace challenges in oracle Multitenant
OUGN   winning performnace challenges in oracle MultitenantOUGN   winning performnace challenges in oracle Multitenant
OUGN winning performnace challenges in oracle MultitenantPini Dibask
 
Winning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenantWinning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenantPini Dibask
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudipasalapudi123
 
Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...Pini Dibask
 
Security Multitenant
Security MultitenantSecurity Multitenant
Security MultitenantArush Jain
 
OEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 EditionOEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 EditionBobby Curtis
 
Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresmkorremans
 
SOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20cSOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20cStefan Oehrli
 
What is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? PresentationWhat is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? PresentationFrancisco Alvarez
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitecturePini Dibask
 

Similar to Oracle 12c PDB insights (20)

Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
Presentation day2 oracle12c
Presentation day2 oracle12cPresentation day2 oracle12c
Presentation day2 oracle12c
 
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
 
OOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architectureOOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architecture
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
 
RMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle MultitenantRMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle Multitenant
 
Simplify Consolidation with Oracle Pluggable Databases
Simplify Consolidation with Oracle Pluggable DatabasesSimplify Consolidation with Oracle Pluggable Databases
Simplify Consolidation with Oracle Pluggable Databases
 
Winning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle MultitenantWinning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle Multitenant
 
OUGN winning performnace challenges in oracle Multitenant
OUGN   winning performnace challenges in oracle MultitenantOUGN   winning performnace challenges in oracle Multitenant
OUGN winning performnace challenges in oracle Multitenant
 
Winning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenantWinning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenant
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
 
Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...
 
Security Multitenant
Security MultitenantSecurity Multitenant
Security Multitenant
 
OEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 EditionOEM12c, DB12c and You! - RMOUG TD2014 Edition
OEM12c, DB12c and You! - RMOUG TD2014 Edition
 
Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-features
 
Presentation day1oracle 12c
Presentation day1oracle 12cPresentation day1oracle 12c
Presentation day1oracle 12c
 
SOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20cSOUG PDB Security, Isolation and DB Nest 20c
SOUG PDB Security, Isolation and DB Nest 20c
 
What is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? PresentationWhat is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? Presentation
 
Presentation day5 oracle12c
Presentation day5 oracle12cPresentation day5 oracle12c
Presentation day5 oracle12c
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Oracle 12c PDB insights

  • 1. ORACLE 12C PLUGGABLE DATABASE FEATURE INSIGHTS DOAG 21/02/2013 Kirill Loifman Oracle Certified Professional DBA www: dadbm.com Twitter: @loifmkir
  • 2. ORACLE 12C PLUGGABLE DATABASE (PDB) • Native support for Cloud Computing => great help in database consolidation • Fundamental architectural change => true for Oracle DB • Feature that I’ve been waiting a decade 12c Pluggable Database Footer 14/03/2012 2
  • 3. 12C PDB ARCHITECTURE & FEATURES • Many Pluggable Databases (PDBs) inside a single container database (CDB) • PDB is backwards compatible with an ordinary pre-12.1 database • PDB namespaces are entirely independent of one another • A session sees only the single PDB it connects to • Unplug a PDB from one CDB and plug it into another CDB • Clone a PDB, both within the same CDB or from one CDB to another one • The operations on PDBs are implemented as SQL statements • CDB’s administrator executes these operations when connected to a CDB • All PDBs can be backed up at once, but recovered separately • PDB is transparent to applications 14/03/2012 3
  • 4. 12C PLUGGABLE DATABASE BENEFITS • Consolidate many PDBs onto a single platform • Fast provisioning of a new PDB or of a clone of an existing PDB • Fast redeployment, by unplug and plug, of an existing database to a new platform • Patch or upgrade the Oracle Database version for many PDBs quickly by doing it just once • Patch or upgrade a single PDB by unplugging it and plugging it into a different CDB at a later version • Separation of the content of one PDB from that of peer PDBs in the same CDB • Separation of the duties of the application administrators of these PDBs • Conventional non-CDB database mode is still available in Oracle 12c • More efficient in terms of resource consumption, scalability and manageability • Based on Oracle show case, PDBs consume 6 times less hardware resources and are 5 times more scalable Footer 14/03/2012 4
  • 5. ORACLE VS OTHERS Oracle before-12c database SQL Server 2000 * Encapsulation of instances, databases, schemas and objects Oracle 12c & SQL Server 2005 Footer 14/03/2012 5
  • 6. 12C PLUGGABLE DATABASE DETAILS • Each PDB has its own private data dictionary for customer-created database objects; CDB has the data dictionary for the Oracle-supplied system; Each data dictionary defines its own namespace. • There is a new split data dictionary architecture that allows a PDB to be quickly unplugged from one CDB and plugged into a different CDB • Each PDB sees a read-only definition of the Oracle-supplied system • There are global database initialization parameters on CDB level and local PDB ones. PDB parameters belong only to a particular PDB and will be persistent even after you unplug you PDB. • Database users can be global (CDB) or local (PDB only). If a new user created in CDB it’s seen also in PDB. In case of creation of a user on PDB level it will stay local. Footer 14/03/2012 6
  • 7. 12C PLUGGABLE DATABASE DETAILS (CONTINUE) • Temporary tablespaces can be global or local • Redo logs and Undo tablespace are only global (on CDB level) • Data Guard acts on the CDB as a whole • RMAN scheduled backups are done for the CDB as a whole; you can back up and recover a selected PDB whenever you want to • An application connects, with no code changes, to a PDB; the system administrator connects to the CDB; the service named in the connect string specifies the destination DB • One PDB knows nothing of the other PDBs within the same CDB; each PDB is a hermetically sealed container. That ensures new level of DB independence and robust security Footer 14/03/2012 7
  • 8. HANDS-ON LAB : PREPARATION • Hands-on Lab databases (12.1 Beta2) 12c Container DB 1 (CDB1): /u01/app/oracle/oradata/cdb1 12c Container DB 2 (CDB2): /u01/app/oracle/oradata/cdb2 12c Non-Container DB (nonCDB): /u01/app/oracle/oradata/noncdb • SQL*Plus Database Connection examples -- connect to a CDB (container called CDB$Root) : connect sys/pass@localhost:1521/cdb1 as sysdba -- connect to a PDB (container My_PDB): connect scott/pass@localhost:1521/My_PDB • Discover the current container select Sys_Context('Userenv', 'Con_Name') "current container" from dual; SQL+> show Con_Name Footer 14/03/2012 8
  • 9. LAB 1: CREATE AND OPEN A PDB • Connect to a Container Database (CDB) sqlplus sys/pass@localhost:1521/cdb1 as sysdba • Create a new Oracle 12c Pluggable Database (PDB) (by cloning PDB$Seed template) create pluggable database My_PDB admin user App_Admin identified by password file_name_convert = ('/pdbseed/', '/my_pdb/'); • Open PDB alter pluggable database My_PDB open; • Verify the PDB datafiles select Con_ID, Tablespace_Name, File_Name from CDB_Data_Files where File_Name like '%/cdb1/pdbseed/%‘ or File_Name like '%/cdb1/my_pdb/%‘; CON_ID -----2 2 3 3 Tablespace_Name -----------SYSAUX SYSTEM SYSAUX SYSTEM File_Name ------------------------------------------------/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf /u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf /u01/app/oracle/oradata/cdb1/My_PDB/sysaux01.dbf /u01/app/oracle/oradata/cdb1/My_PDB/system01.dbf Footer 14/03/2012 9
  • 10. LAB 2: SETTING OPEN_MODE FOR A PDB / DROP PDB • Each PDB within a CDB has its own Open_Mode and Restricted status select Name, Open_Mode, Restricted, Inst_ID from gv$PDBs; Open_Mode= MOUNTED | READ ONLY | READ WRITE / Restricted = Yes | No | Null • Starting an instance (which opens the entire CDB) does not cause PDBs to be opened sqlplus sys/pass@localhost:1521/cdb1 as sysdba startup alter pluggable database all open; … alter pluggable database all close; • Drop a PDB alter pluggable database MY_PDB close immediate; drop pluggable database MY_PDB including datafiles'; Footer 14/03/2012 10
  • 11. LAB 3: CLONE AN EXISTING PDB • Switch a PDB to READ ONLY mode before cloning (online mode will come) alter pluggable database My_PDB close; alter pluggable database My_PDB open read only; create pluggable database My_Clone from My_PDB file_name_convert = ('/my_pdb/', '/my_clone/'); alter pluggable database My_PDB close; alter pluggable database My_PDB open; alter pluggable database My_Clone open; • Verify CDB data files select Con_ID, File_Name from CDB_Data_Files; Footer 14/03/2012 11
  • 12. LAB 4: UNPLUG PDB FROM CDB1 • Unplug MY_PDB alter pluggable database My_PDB close; alter pluggable database My_PDB unplug into '/u01/app/oracle/oradata/cdb1/my_pdb/my_pdb.xml‘; • Backup UNPLUGGED MY_PDB with RMAN (if required) • Drop PDB – remove it from CDB catalog drop pluggable database My_PDB; -- or preserve data files for later PDB plug-in operation: drop pluggable database My_PDB keep datafiles; Footer 14/03/2012 12
  • 13. LAB 5: PLUG PDB INTO CDB2 • Connect to cdb2 (/u01/app/oracle/oradata/cdb2) sqlplus sys/pass@localhost:1521/cdb2 as sysdba; • Compatibility Check ( error if NOT compatible ) exec DBMS_PDB.Check_Plug_Compatibility( PDB_Descr_File =>'/u01/app/oracle/oradata/cdb1/my_pdb/my_pdb.xml') • Plug In My_PDB create pluggable database My_PDB using '/u01/app/oracle/oradata/cdb1/my_pdb/my_pdb.xml‘ move file_name_convert = ('/cdb1/', '/cdb2/'); alter pluggable database My_PDB open; Footer 14/03/2012 13
  • 14. LAB 6: CREATE PDB AS A CLONE OF AN UNPLUGGED PDB • Clone From Sample_Schemas “Gold Image” create pluggable database Sample_Schemas_1 as clone using '/u01/app/oracle/oradata/gold_pdbs/sample_schemas/sample_schemas.xml‘ copy file_name_convert = ('/gold_pdbs/sample_schemas/', '/cdb1/sample_schemas_1/'); alter pluggable database Sample_Schemas_1 open; • Show PDB GUID select PDB_Name, GUID from DBA_PDBs order by Creation_scn; Footer 14/03/2012 14
  • 15. LAB 7: ADOPTING NON-CDB AS A PDB INTO EXISTING CDB • Upgrade your existing database into a 12.1 non-CDB • Generate the xml manifest file of nonCDB shutdown immediate startup mount alter database open read only; begin DBMS_PDB.Describe(PDB_Descr_File => '/u01/app/oracle/oradata/noncdb/noncdb.xml'); end; / shutdown immediate • Connect to CDB1 sqlplus sys/pass@localhost:1521/cdb1 as sysdba Footer 14/03/2012 15
  • 16. LAB 7: CONTINUE • Plug in the datafiles of nonCDB into CDB1 create pluggable database ExNonCDB as clone using '/u01/app/oracle/oradata/noncdb/noncdb.xml‘ source_file_name_convert = none copy file_name_convert = ('/noncdb/', '/cdb1/exnoncdb/') storage unlimited; • Open it, to finalize the plug-in, close it, and re-open it Restricted mode alter pluggable database ExNonCDB open; alter pluggable database ExNonCDB close; alter pluggable database ExNonCDB open restricted; • Remove not required data from the PDB local data dictionary alter session set container = ExNonCDB; @?/rdbms/admin/noncdb_to_pdb.sql • Open the newly-adoped PDB (former non-CDB) alter pluggable database ExNonCDB open; Footer 14/03/2012 16
  • 17. ORACLE 12C CDB / PDB CHARACTERISTICS • CDB PDB DB name example cdb1 MY_PDB Containter name CDB$Root MY_PDB Service name cdb1 MY_PDB Tablespaces system, sysaux, temp, undo system, sysaux, (temp is possible) Redo logs Yes No Data Dictionary Own global Own local PDB Template PDB$Seed PDB manifest XML file Footer 14/03/2012 17