SlideShare a Scribd company logo
Demonstration Oracle Pluggable databases
Jaap Poot, 15 juli 2013
Oracle Multitenant
Demonstration
Oracle Multitenant
• Environment
• Cloning a Pluggable database locally
• Cloning a Pluggable database remotely
• Unplug/plug a database
– Unplug PDB
– Plug as nocopy
– Plug as copy
– Plug as move
• Adopting a non-CDB as a PDB
3
Environment
• Two Oracle Enterprise Linux 6 VM’s in Virtualbox
– 4 vcpu
– 8Gb memory
– 50Gb disk
• Oracle database 12.1.0.1 installed
• Created databases, using DBCA
– System 1 (db12c-1)
• 1 Container database (cdb1)
• 1 Pluggable database (pdb2)
– System 2 (db12c-2)
• 1 Container database (cdb2)
• 1 non-CDB database
4
Cloning a
Pluggable database locally
• Using sqlplus
alter pluggable database pdb2 close immediate;
alter pluggable database pdb2 open read only;
create pluggable database pdb4 from pdb2
file_name_convert =
('/u02/oradata/CDB1/datafile/PDB2/','/u02/oradata/CDB1/datafile/PDB4/');
select name, open_mode from v$pdbs;
alter pluggable database pdb2 open force;
alter pluggable database pdb4 open;
select name, open_mode from v$pdbs;
5
Cloning a
Pluggable database remotely
• Using sqlplus
alter pluggable database pdb2 close immediate;
alter pluggable database pdb2 open read only;
-- On destination cdb
-- create destination directory
mkdir /u02/oradata/CDB2/datafile/PDB5
-- Create database link
create database link pdb2_link connect to system identified by Welcome01 using 'pdb2';
create pluggable database pdb5 from pdb2@pdb2_link
file_name_convert =
('/u02/oradata/CDB1/datafile/PDB2/','/u02/oradata/CDB2/datafile/PDB5/');
6
Unplug/plug a PDB
• Unplug PDB
alter pluggable database pdb4 close immediate;
alter pluggable database pdb4 unplug into '/u02/oradata/CDB1/datafile/PDB4/pdb4.xml';
drop pluggable database pdb4 keep datafiles;
• Plug as nocopy
create pluggable database pdb4 using '/u02/oradata/CDB2/datafile/PDB4/pdb4.xml'
source_file_name_convert=('CDB1','CDB2')
nocopy
tempfile reuse;
7
Unplug/plug a PDB
• Plug as copy
create pluggable database pdb5 as clone using
'/u02/oradata/CDB2/datafile/PDB4/pdb4.xml'
source_file_name_convert=('CDB1','CDB2')
copy
file_name_convert =
('/u02/oradata/CDB2/datafile/PDB4/','/u02/oradata/CDB2/datafile/PDB5/');
• Plug as move
create pluggable database pdb7 using '/u02/oradata/CDB2/datafile/PDB4/pdb4.xml'
source_file_name_convert=('CDB1','CDB2')
move
file_name_convert =
('/u02/oradata/CDB2/datafile/PDB4/','/u02/oradata/CDB2/datafile/PDB7/');
8
Adopting a non-CDB as a PDB
• Adoption of the content of a non-CDB
– Create an export using Datapump
– Create a new PDB
– Import content using Datapump
– Alternative, use Oracle GoldenGate to populate a new PDB
from the source non-CDB
• Direct adoption of a 12.1 non-CDB as a PDB
(Upgrade pre 12c database to 12c using the usual approach if needed)
– Put the non-CDB in Read-only mode
– Generate PDB manifest file
– Create and plug-in PDB using manifest file
– Convert to PDB Data dictionary
9
Adopting a non-CDB as a PDB
• Setting the Non-CDB to Read-Only Mode
Set the ORACLE_SID variable to noncdb
sqlplus / as sysdba
shutdown immediate
startup mount exclusive
alter database open read only;
select name, open_mode from v$database;
• Generating a Pluggable Database Manifest File for the Non-CDB
exec dbms_pdb.describe(pdb_descr_file=>'/u02/oradata/noncdb/noncdb.xml');
exit
10
Adopting a non-CDB as a PDB
• Creating and Plugging in a PDB into cdb2 by Using the noncdb Manifest
File
Set the ORACLE_SID variable to cdb2
sqlplus / as sysdba
create pluggable database exnoncdb as clone using '/u02/oradata/noncdb/noncdb.xml'
copy
file_name_convert=('/u02/oradata/noncdb','/u02/oradata/CDB2/datafile/EXNONCDB');
alter pluggable database exnoncdb open;
alter pluggable database exnoncdb close immediate;
alter pluggable database exnoncdb open restricted;
• Converting to PDB Data Dictionary
alter session set container = EXNONCDB
@$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql
• Note. Can take up to 20 minutes
11
Final
• Other tools besides sqlplus.
– Oracle Enterprise manager 12c
– SQL Developer supports Pluggable databases
– DBCA supports Pluggable databases, on the server.
– Other tools ….
• Questions?
• jaap@amis.nl of jaap.poot@amis.nl
12

More Related Content

PDF
Ceph and RocksDB
ODP
Dedupe nmamit
PDF
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
PDF
XSKY - ceph luminous update
ODP
YDAL Barcelona
PPTX
Some key value stores using log-structure
PDF
BlueStore, A New Storage Backend for Ceph, One Year In
PDF
RocksDB meetup
Ceph and RocksDB
Dedupe nmamit
Ceph BlueStore - новый тип хранилища в Ceph / Максим Воронцов, (Redsys)
XSKY - ceph luminous update
YDAL Barcelona
Some key value stores using log-structure
BlueStore, A New Storage Backend for Ceph, One Year In
RocksDB meetup

What's hot (20)

PDF
Log Structured Merge Tree
ODP
Tiering barcelona
PPTX
Ceph Day KL - Bluestore
PDF
RocksDB storage engine for MySQL and MongoDB
PDF
Gluster for sysadmins
ODP
Lcna tutorial-2012
PPTX
MongoDB basics & Introduction
PPTX
Introduction to Redis
PDF
Gluster overview & future directions vault 2015
PPTX
Red Hat Gluster Storage, Container Storage and CephFS Plans
PDF
2019.06.27 Intro to Ceph
PDF
Disperse xlator ramon_datalab
PDF
Gluster d2
PPTX
Introduction to Redis
ODP
Sdc challenges-2012
PPTX
Ui5 con@Banglore - UI5 App with Offline Storage using PouchDB
PPTX
Ceph at Work in Bloomberg: Object Store, RBD and OpenStack
PDF
Gluster.community.day.2013
PDF
Challenges with Gluster and Persistent Memory with Dan Lambright
PDF
Boosting Machine Learning with Redis Modules and Spark
Log Structured Merge Tree
Tiering barcelona
Ceph Day KL - Bluestore
RocksDB storage engine for MySQL and MongoDB
Gluster for sysadmins
Lcna tutorial-2012
MongoDB basics & Introduction
Introduction to Redis
Gluster overview & future directions vault 2015
Red Hat Gluster Storage, Container Storage and CephFS Plans
2019.06.27 Intro to Ceph
Disperse xlator ramon_datalab
Gluster d2
Introduction to Redis
Sdc challenges-2012
Ui5 con@Banglore - UI5 App with Offline Storage using PouchDB
Ceph at Work in Bloomberg: Object Store, RBD and OpenStack
Gluster.community.day.2013
Challenges with Gluster and Persistent Memory with Dan Lambright
Boosting Machine Learning with Redis Modules and Spark
Ad

Viewers also liked (6)

PPTX
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
PDF
Ronald van Luttikhuizen - Effective fault handling in SOA Suite and OSB 11g
PDF
Presentatie - Introductie in Groovy
PPTX
AMIS OOW Review 2012 - Deel 7 - Lucas Jellema
PPTX
PDF
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
Ronald van Luttikhuizen - Effective fault handling in SOA Suite and OSB 11g
Presentatie - Introductie in Groovy
AMIS OOW Review 2012 - Deel 7 - Lucas Jellema
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
Ad

Similar to Oracle 12c revealed Demonstration (20)

PPTX
Oracle 12c - Multitenant Feature
PDF
Oracle 12c PDB insights
PDF
One PDB to go, please!
PDF
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
PDF
Migration to Oracle Multitenant
PDF
OOW 17 - database consolidation using the oracle multitenant architecture
PDF
Super hybrid2016 tdc
PPT
Oracle12c Pluggable Database Hands On - TROUG 2014
PPTX
Eouc 12 on 12c osama mustafa
PDF
Exploring Oracle Multitenant in Oracle Database 12c
PPTX
Using oracle12c pluggable databases to archive
PPTX
Simplify Consolidation with Oracle Database 12c
PPTX
2-day-dba-oracle.pptx
PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
PDF
Exploring Oracle Database 12c Multitenant best practices for your Cloud
PPTX
Collaborate 17 - Database consolidation using the oracle multitenant architec...
PDF
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
PDF
Oracle 12c and its pluggable databases
PPT
173955573244324324324424322adsadsaasd.ppt
PDF
Database as a Service on the Oracle Database Appliance Platform
Oracle 12c - Multitenant Feature
Oracle 12c PDB insights
One PDB to go, please!
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Migration to Oracle Multitenant
OOW 17 - database consolidation using the oracle multitenant architecture
Super hybrid2016 tdc
Oracle12c Pluggable Database Hands On - TROUG 2014
Eouc 12 on 12c osama mustafa
Exploring Oracle Multitenant in Oracle Database 12c
Using oracle12c pluggable databases to archive
Simplify Consolidation with Oracle Database 12c
2-day-dba-oracle.pptx
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Collaborate 17 - Database consolidation using the oracle multitenant architec...
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Oracle 12c and its pluggable databases
173955573244324324324424322adsadsaasd.ppt
Database as a Service on the Oracle Database Appliance Platform

More from Getting value from IoT, Integration and Data Analytics (20)

PPTX
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
PPTX
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
PPTX
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
PPTX
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
PPTX
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
PPTX
10 tips voor verbetering in je Linkedin profiel
PPTX
Iot in de zorg the next step - fit for purpose
PPTX
Iot overview .. Best practices and lessons learned by Conclusion Conenct
PPTX
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
PPTX
Industry and IOT Overview of protocols and best practices Conclusion Connect
PPTX
IoT practical case using the people counter sensing traffic density build usi...
PPTX
Introduction overviewmachinelearning sig Door Lucas Jellema
PPTX
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
PPTX
Ethereum smart contracts - door Peter Reitsma
PPTX
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
PPTX
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
PPTX
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
PDF
Omc AMIS evenement 26012017 Dennis van Soest
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
10 tips voor verbetering in je Linkedin profiel
Iot in de zorg the next step - fit for purpose
Iot overview .. Best practices and lessons learned by Conclusion Conenct
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
Industry and IOT Overview of protocols and best practices Conclusion Connect
IoT practical case using the people counter sensing traffic density build usi...
Introduction overviewmachinelearning sig Door Lucas Jellema
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Ethereum smart contracts - door Peter Reitsma
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Omc AMIS evenement 26012017 Dennis van Soest

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Machine learning based COVID-19 study performance prediction
PDF
Electronic commerce courselecture one. Pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Getting Started with Data Integration: FME Form 101
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Machine learning based COVID-19 study performance prediction
Electronic commerce courselecture one. Pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Tartificialntelligence_presentation.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
The Rise and Fall of 3GPP – Time for a Sabbatical?
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MYSQL Presentation for SQL database connectivity
Getting Started with Data Integration: FME Form 101
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
Accuracy of neural networks in brain wave diagnosis of schizophrenia

Oracle 12c revealed Demonstration

  • 1. Demonstration Oracle Pluggable databases Jaap Poot, 15 juli 2013 Oracle Multitenant
  • 2. Demonstration Oracle Multitenant • Environment • Cloning a Pluggable database locally • Cloning a Pluggable database remotely • Unplug/plug a database – Unplug PDB – Plug as nocopy – Plug as copy – Plug as move • Adopting a non-CDB as a PDB
  • 3. 3 Environment • Two Oracle Enterprise Linux 6 VM’s in Virtualbox – 4 vcpu – 8Gb memory – 50Gb disk • Oracle database 12.1.0.1 installed • Created databases, using DBCA – System 1 (db12c-1) • 1 Container database (cdb1) • 1 Pluggable database (pdb2) – System 2 (db12c-2) • 1 Container database (cdb2) • 1 non-CDB database
  • 4. 4 Cloning a Pluggable database locally • Using sqlplus alter pluggable database pdb2 close immediate; alter pluggable database pdb2 open read only; create pluggable database pdb4 from pdb2 file_name_convert = ('/u02/oradata/CDB1/datafile/PDB2/','/u02/oradata/CDB1/datafile/PDB4/'); select name, open_mode from v$pdbs; alter pluggable database pdb2 open force; alter pluggable database pdb4 open; select name, open_mode from v$pdbs;
  • 5. 5 Cloning a Pluggable database remotely • Using sqlplus alter pluggable database pdb2 close immediate; alter pluggable database pdb2 open read only; -- On destination cdb -- create destination directory mkdir /u02/oradata/CDB2/datafile/PDB5 -- Create database link create database link pdb2_link connect to system identified by Welcome01 using 'pdb2'; create pluggable database pdb5 from pdb2@pdb2_link file_name_convert = ('/u02/oradata/CDB1/datafile/PDB2/','/u02/oradata/CDB2/datafile/PDB5/');
  • 6. 6 Unplug/plug a PDB • Unplug PDB alter pluggable database pdb4 close immediate; alter pluggable database pdb4 unplug into '/u02/oradata/CDB1/datafile/PDB4/pdb4.xml'; drop pluggable database pdb4 keep datafiles; • Plug as nocopy create pluggable database pdb4 using '/u02/oradata/CDB2/datafile/PDB4/pdb4.xml' source_file_name_convert=('CDB1','CDB2') nocopy tempfile reuse;
  • 7. 7 Unplug/plug a PDB • Plug as copy create pluggable database pdb5 as clone using '/u02/oradata/CDB2/datafile/PDB4/pdb4.xml' source_file_name_convert=('CDB1','CDB2') copy file_name_convert = ('/u02/oradata/CDB2/datafile/PDB4/','/u02/oradata/CDB2/datafile/PDB5/'); • Plug as move create pluggable database pdb7 using '/u02/oradata/CDB2/datafile/PDB4/pdb4.xml' source_file_name_convert=('CDB1','CDB2') move file_name_convert = ('/u02/oradata/CDB2/datafile/PDB4/','/u02/oradata/CDB2/datafile/PDB7/');
  • 8. 8 Adopting a non-CDB as a PDB • Adoption of the content of a non-CDB – Create an export using Datapump – Create a new PDB – Import content using Datapump – Alternative, use Oracle GoldenGate to populate a new PDB from the source non-CDB • Direct adoption of a 12.1 non-CDB as a PDB (Upgrade pre 12c database to 12c using the usual approach if needed) – Put the non-CDB in Read-only mode – Generate PDB manifest file – Create and plug-in PDB using manifest file – Convert to PDB Data dictionary
  • 9. 9 Adopting a non-CDB as a PDB • Setting the Non-CDB to Read-Only Mode Set the ORACLE_SID variable to noncdb sqlplus / as sysdba shutdown immediate startup mount exclusive alter database open read only; select name, open_mode from v$database; • Generating a Pluggable Database Manifest File for the Non-CDB exec dbms_pdb.describe(pdb_descr_file=>'/u02/oradata/noncdb/noncdb.xml'); exit
  • 10. 10 Adopting a non-CDB as a PDB • Creating and Plugging in a PDB into cdb2 by Using the noncdb Manifest File Set the ORACLE_SID variable to cdb2 sqlplus / as sysdba create pluggable database exnoncdb as clone using '/u02/oradata/noncdb/noncdb.xml' copy file_name_convert=('/u02/oradata/noncdb','/u02/oradata/CDB2/datafile/EXNONCDB'); alter pluggable database exnoncdb open; alter pluggable database exnoncdb close immediate; alter pluggable database exnoncdb open restricted; • Converting to PDB Data Dictionary alter session set container = EXNONCDB @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql • Note. Can take up to 20 minutes
  • 11. 11 Final • Other tools besides sqlplus. – Oracle Enterprise manager 12c – SQL Developer supports Pluggable databases – DBCA supports Pluggable databases, on the server. – Other tools …. • Questions? • jaap@amis.nl of jaap.poot@amis.nl
  • 12. 12