SlideShare a Scribd company logo
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
<Insert Picture Here>
<Insert Picture Here>
Oracle Database 12c –
Pluggable Databases – Part I
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Using the Player
Course Outline
Player Controls
Print Version
Change View
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Road Map
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Road Map
PART – II
PART – I
PART – III
PROPERTIES
Allow user to leave interaction: After viewing all the steps
Show ‘Next Slide’ Button: Show upon completion
Completion Button Label: Next Slide
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Why Take This Course?
• What’s in it for me?
• What are challenges I face on the job?
• How can this help me do my job better?
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
<Insert Picture Here>
<Insert Picture Here>
Oracle Database 12c –
Basics of Container and Pluggable Databases
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Road Map
PART – I
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Challenges
Many Oracle customers have large numbers of “departmental”
applications built on Oracle RDBMS.
• Do NOT use a significant percentage of the hardware on
which they are deployed
• Have instance and storage overhead preventing large
numbers of “departmental” databases from being placed
on the same physical and storage server
• Are NOT sufficient complexity to require 100% of the
attention of a full time administrator
• Do require significant time to patch or upgrade all
applications
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Benefits of 12c Pluggable Databases
• Operates multiple monolithic databases in a centrally
managed platform to lower costs:
– Less instance overhead
– Less storage cost
• Reduces DBA resources costs and maintains security
– No application changes
– Fast and easy provisioning
– Time saving for patching and upgrade
– Maintain separation of duties between:
– Different application administrators
– Application administrators and DBA
– Users within application
• Provides isolation
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Benefits of 12c Pluggable Databases
• Ensures full backwards-compatibility with non-CDB
• Fully operates with RAC
• Is integrated with Enterprise and Resource Manager
• Allows central management and administration of
multiple databases
– Backups / Disaster recovery
– Patching and Upgrades
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
User Data is Added
In a non-CDB, user data is added:
• The metadata is mixed with the Oracle supplied data in the
data dictionary.
…
OBJ$ TAB$ SOURCE$
…
EMP DEPT
Oracle System data mixed with
User metadata
User Data
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Separating System and User Data
…
OBJ$ TAB$ SOURCE$
…
EMP DEPT
User Metadata only User Data
…
OBJ$ TAB$ SOURCE$
Oracle Metadata only
Container Database
Container
for
System
Container for Application
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Naming the Containers within Container Database
• The Oracle supplied
container is called the root
container
• User container is a
pluggable database (PDB)
Oracle Metadata only
root
Container Database
PDB
User Metadata only User Data
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Provisioning Pluggable Databases
Seed
PDB
New
empty
PDB
Imagine this
when the datafiles
are on a filesystem
that supports
copy-on-change
root
Four methods:
• Create new PDB from PDB$SEED pluggable database
• Plug in a non-CDB
• Clone a PDB from another PDB into the same or another
CDB
• Plug an unplugged PDB into another CDB
Container Database
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Container Database Architecture
Instance
System Global Area
Process Structures
Server
Instance
Container
database
root container
Datafiles Redo Log files
Control files
UNDO
TEMP
SYSTEM
SYSAUX
seed PDB
Datafiles
SYSTEM
SYSAUX EXAMPLE
SALES PDB
SYSTEM
SYSAUX TBS2
HR PDB
Data
files
TEMPO
Datafiles
TEMP2
PDBid2 PDBid3 PDBid4 PDBid2 PDBid4
Single DB shares:
• Background
processes
• Shared/process
memory
• Oracle metadata
• Redo log files
• Control files
• Some datafiles
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Terminology
• Common vs Local:
– Users
– Roles
– Privileges
– Objects
• CDB vs PDB level:
– Global Resource Manager plan vs local RM plan
– Unified audit at CDB or PDB level
– Xstream at CDB or PDB level
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Common and Local Users
Container Database
root
PDB_HR
PDB_SALES
Table
HR.REGIONS
USERNAME COMMON
SYS YES
SYSTEM YES
CDBA YES
HR YES
View CDB_USERS
Adding a common user, involves adding a
description of that user in the root and in every
PDB.
Certain operations, such as ALTER SESSION
SET CONTAINER can only be executed by
common users. Then depending on the way
the privileges are granted, common users can
or cannot perform operations.
A local user is a traditional user, known only
in its own PDB.
View DBA_USERS
USERNAME COMMON
SYS YES
SYSTEM YES
CDBA YES
HR YES
SALES NO
USERNAME COMMON
SYS YES
SYSTEM YES
CDBA YES
HR YES
HR_MGR NO
View DBA_USERS
Table
SALES.COUNTRIES
Tablespace
EXAMPLE
Tablespace
EXAMPLE
Tablespace
EXAMPLE
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
CDB_xxx All of the objects in the container database across all PDBs
USER_xxx Objects owned by the current user
ALL_xxx Objects accessible by the current user
DBA_xxx All of the objects in a container or pluggable database
Data Dictionary Views
• CDB_pdbs : All PDBS within CDB
• CDB_tablespaces : All tablespaces within CDB
• CDB_users : All users within CDB (common and local)
DBA dictionary views providing information within PDB:
SQL> SELECT view_name FROM dba_views WHERE view_name like 'CDB%';
SQL> SELECT table_name FROM dict WHERE table_name like 'DBA%';
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Backup
• Whole CDB backup: control files, root and PDBs
datafiles
• Whole PDB backup: PDBs datafiles
• Hot backups: not available in Beta1
– PDB level
Backup/Recovery/Flashback Database
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Recovery
• Instance recovery: CDB level only
• Complete media recovery from file loss or damage
– CDB level
– PDB level: not available in Beta1
– Tablespace level: same as for non-CDB
• Incomplete media recovery after file loss or corruption
– CDB level: same as for non-CDB
– PDB level not available in Beta1
– TSPITR for root tablespaces ONLY except SYSTEM,
UNDO, SYSAUX
• Flashback database
– CDB level only
– PDB level not available in Beta1
• Block recovery: no change
Backup/Recovery/Flashback Database
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Migrating pre-12c Databases to 12c CDB
Container Database CDB1
root
Data files Redo Log
files
Control
files
Create
PDB1
from
ORCL
ORCL
Datafiles Control
files
Redo Log
files
expdp
Dump file
PDB1
Data files
impdp
There are two methods:
Method 1
Upgrade a pre-12c database to 12c
Plug-in the non-CDB into a CDB
using different methods
Or
Method 2
1. Pre-create a PDB in CDB
2. Use 11g expdp / 12c impdp
or
2. Use replication between the non-CDB
and the PDB
ORCL
Datafiles Control
files
Redo Log
files
1
2
11g
12c
2
1
Replication
DBMS_PDB
XML file
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
• One character set for all PDBs (Unicode recommended)
• PDB initialization parameters but a single SPFILE
• No PDB qualified database object names
– SELECT * FROM HR:apps.tab1
– Use DB Links: SELECT * FROM apps.tab1@HR
• Data Guard at CDB level
• Database Vault per PDB only
• Unified audit both at CDB and PDB level
Impacts
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Lesson Summary
In this first lesson, we discussed:
• The benefits for a container database
• The architecture of a container database
• The root container and the pluggable database container
• The methods for provisioning new pluggable databases
• The backup and recovery capabilities and upgrade
methods
• The impacts
PART – I
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Next Slide
Allow user to leave quiz: At any time
User may view slides after quiz: At any time
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
<Insert Picture Here>
<Insert Picture Here>
Oracle Database 12c –
Configuring and Creating a Container Database
Copyright © 2011, Oracle and/or its affiliates.All rights reserved.
Road Map
PART – I
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Create a container database:
• To consolidate many pre-12.1 non-CDBs into a single,
larger database
• To prepare a container
– For plugging any future new application
– For testing applications
– For diagnosing application performance
– For unplugging/plugging operations
• To simplify and reduce time for patching and upgrade
Goals
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Instance
SGA
Process Structures
Instance
Container
Database
CDB1
root container
seed pluggable database
Steps to Create a Container Database
2
1
Container Database CDB1
Datafiles
Control
files
UNDO
SYSTEM
SYSAUX
Redo Log
files
SYSTEM
TEMP1
TEMP
SYSAUX
initCDB1.ora
3
4
Execute
catalog.sql
catproc.sql
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
A CDB has new characteristics compared to non-CDBs:
• Two containers:
– The root (CDB$ROOT)
– The seed PDB (PDB$SEED)
• Several services: one per container
– Name of root service = name of the CDB: cdb1
• Common users in root and seed: SYS,SYSTEM …
• Common privileges granted to common users
• Common roles
• Tablespaces and datafiles associated to each container:
– root: SYSTEM contains system-supplied metadata and no user
data, SYSAUX
– seed: SYSTEM, SYSAUX
After CDB Creation – What’s New in CDB
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
CDB_xxx All of the objects in the container database (new column CON_ID)
USER_xxx Objects owned by the current user in a PDB
ALL_xxx Objects accessible by the current user in a PDB
DBA_xxx All of the objects in the root or a pluggable database
Data Dictionary Views – CDB_xxx and V$xxx
CDB dictionary views provide information across PDBs:
• CDB_pdbs : all PDBS within the CDB
• CDB_tablespaces : all tablespaces within the CDB
• CDB_data_files : all datafiles within the CDB
• CDB_users : all users within the CDB (common and local)
SQL> SELECT view_name FROM dba_views
2 WHERE view_name like 'CDB%';
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
In this second lesson, we discussed:
• Create a container database
• Explore CDB instance, files and PDB structures
Lesson Summary
PART – I
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Next Slide
Allow user to leave quiz: At any time
User may view slides after quiz: At any time
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
<Insert Picture Here>
<Insert Picture Here>
Oracle Database 12c –
Pluggable Databases Provisioning
Copyright © 2011, Oracle and/or its affiliates.All rights reserved.
Road Map
PART – I
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Click to edit Master title style
Goals
Why provisioning pluggable databases in a CDB ?
• To consolidate many non-CDBs into a single, larger
database, the CDB
– To lower costs
– To better exploit hardware and DBA resources
• To avoid the creation of new databases and instances
when:
– Implementing new application
– Testing new applications
– Diagnosing new application performance
• To simplify and reduce time for patching and upgrade
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Click to edit Master title style
Provisioning New Pluggable Databases
Four methods:
• Create a new PDB from the seed PDB
• Plug a non-CDB in a CDB
• Clone a PDB from another PDB:
– Into the same CDB
– Into another CDB
• Plug an unplugged PDB into another CDB
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Method 1 – Create New PDB from PDB$SEED
Container Database CDB1
root
Data files/
Tempfiles
Redo Log
files
Control
files
UNDO
TEMP
PDB$SEED
Data files
SYSAUX
USERS
SYSTEM
SYSAUX
PDB1
Data files
Create
PDB1
from
PDB$SEED
• Copies the datafiles from
PDB$SEED datafiles
• Creates tablespaces SYSTEM,
SYSAUX
• Creates a full catalog including
metadata pointing to Oracle
supplied objects
• Creates common users:
– Superuser SYS
– SYSTEM
• Optionally creates a local user
granted local PDB_DBA role
• Creates a new default service
SYSAUX
SYSTEM
SYSTEM
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Steps – With FILE_NAME_CONVERT
Steps to create a new PDB from the seed using
FILE_NAME_CONVERT clause:
1. Connect to the root as a common user with CREATE
PLUGGABLE DATABASE system privilege:
2. Use views to verify:
SQL> CREATE PLUGGABLE DATABASE pdb1
2 ADMIN USER admin1 IDENTIFIED BY p1 ROLES=(CONNECT)
3 FILE_NAME_CONVERT = (’PDB$SEEDdir’,’PDB1dir’);
SQL> CONNECT / AS SYSDBA
SQL> SELECT * FROM cdb_pdbs;
SQL> SELECT * FROM cdb_tablespaces;
SQL> SELECT * FROM cdb_data_files;
SQL> ALTER PLUGGABLE DATABASE pdb1 OPEN;
SQL> CONNECT sys/password@pdb1 AS SYSDBA
SQL> CONNECT admin1/p1@pdb1
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Method 2 – Clone PDBs within same CDB
Container Database CDB1
root
Data files/
Tempfiles
Redo Log
files
Control
files
PDB$SEED
Data files / Tempfiles
PDB1
Data files
Create
PDB3
from
PDB1
1. In init.ora, set DB_CREATE_FILE_DEST=
'PDB3dir' or
PDB_FILE_NAME_CONVERT='PDB1dir,
PDB3dir'
2. Connect to the root as a common user
with CREATE PLUGGABLE DATABASE
privilege
3. Quiesce PDB1: Close PDB1 first, then
4. Clone PDB3 from PDB1:
5. Open PDB3:
PDB3
Data files
PDB3 owns:
• SYSTEM, SYSAUX tablespaces
• Full catalog
• SYS, SYSTEM common users:
• Same local administrator name
• New service name
SQL> ALTER PLUGGABLE DATABASE
2 pdb1 OPEN READ ONLY;
SQL> CREATE PLUGGABLE DATABASE
2 pdb3 FROM pdb1;
SQL> ALTER PLUGGABLE DATABASE
2 pdb3 OPEN;
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Migrating pre-12.1 Databases to 12.1 CDB
There are two methods:
1. Upgrade an existing pre-12.1 database to 12c
2. Plug-in non-CDB into a CDB
Or
1. Pre-create a PDB in CDB
2. Use 11g expdp / 12c impdp
or
2. Use replication between non-CDB and PDB
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Migrating pre-12.1 Databases to 12.1 CDB
First method:
1. Upgrade an existing 11g database to
12c
2. Plug-in the non-CDB into a CDB
using:
• Export/import
– TTS
– TDB
– Without transportable
• Replication
• DBMS_PDB.DESCRIBE to
generate XML file
Container Database CDB1
root
Data files/
Tempfiles
Redo Log
files
Control
files
Create PDB1
from
ORCL
ORCL
Datafiles Control
files
Redo Log
files
expdp
Dump file
PDB1
Data files
impdp
ORCL
Datafiles Control
files
Redo Log
files
1
2
11g
12c
Replication XML file
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Dropping a PDB
Container Database CDB1
root
Data files/
Tempfiles
Redo Log
files
Control
files
File2
TEMP
PDB$SEED
Data files
File5
File6 File7
File4
File1
File3
PDB1
Data files
File8 Drop PDB1
• If KEEP DATAFILES (default):
– Retain datafiles
– Can be plugged in another or
same CDB
• If INCLUDING DATAFILES:
– Removes PDB1 datafiles
• Updates controlfiles
• Cannot drop seed PDB
File9 File10
PDB4
Data files
SQL> ALTER PLUGGABLE DATABASE
2 pdb1 CLOSE;
SQL> DROP PLUGGABLE DATABASE
2 pdb1 [INCLUDING DATAFILES];
…
File7
File8
File9
File10
…
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Lesson Summary
In this third lesson, we discussed:
• The different methods to provision new pluggable
databases
• The migration methods
• The impact of dropping a pluggable database
PART – I
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Next Slide
Allow user to leave quiz: At any time
User may view slides after quiz: At any time
Copyright © 2012, Oracle and/or its affiliates.All rights reserved.
Course Summary
In this first part of the course, we discussed:
PART – II
PART – I
PART – III
PART – II
PROPERTIES
On passing, 'Finish' button: Goes to Next Slide
On failing, 'Finish' button: Goes to Next Slide
Allow user to leave quiz: At any time
User may view slides after quiz: At any time
PROPERTIES
Allow user to leave interaction: Anytime
Show ‘Next Slide’ Button: Show always
Completion Button Label: Next Slide

More Related Content

PPT
Cooper Oracle 11g Overview
PDF
Ebs 12.2 con9021_pdf_9021_0001
PDF
Ebs architecture con9036_pdf_9036_0001
PDF
GLOC 2014 NEOOUG - R12 Upgrade Downtime Reduction
PPTX
AOUG_11Nov2016_Challenges_with_EBS12_2
PPT
Ugf9796 weblogic for ebs and obiee
PPTX
Oracle database upgrade to 12c and available methods
PDF
Oracle ADF Architecture TV - Deployment - System Topologies
Cooper Oracle 11g Overview
Ebs 12.2 con9021_pdf_9021_0001
Ebs architecture con9036_pdf_9036_0001
GLOC 2014 NEOOUG - R12 Upgrade Downtime Reduction
AOUG_11Nov2016_Challenges_with_EBS12_2
Ugf9796 weblogic for ebs and obiee
Oracle database upgrade to 12c and available methods
Oracle ADF Architecture TV - Deployment - System Topologies

What's hot (20)

PPTX
Oracle EBS R12.2 - Deployment and System Administration
PDF
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
PPTX
E business suite r12.2 changes for database administrators
PDF
What is new on 12c for Backup and Recovery? Presentation
PPTX
Oracle applications r12.2, ebr, online patching means lot of work for devel...
PPT
Oracle Architecture
PDF
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
PDF
Oracle ADF Architecture TV - Design - Architecting for ADF Mobile Integration
PPTX
Oracle 12c Architecture
PPT
Adop and maintenance task presentation 151015
PDF
Ebs12.2 online patching(aioug_aug2015)
PPTX
What’s New in Oracle E-Business Suite R12.2 for Database Administrators?
PPTX
Oracle E-Business Suite R12.2.6 on Database 12c: Install, Patch and Administer
PDF
Preparing for EBS R12.2-upgrade-full
PDF
Oracle ADF Architecture TV - Design - Architecting for PLSQL Integration
PPTX
Application Continuity
PPT
Oracle Applications R12 Architecture
PPTX
Concurrent Processing Performance Analysis for Apps DBAs
PPS
Overview of oracle database
PDF
COLLABORATE 16 Demystifying secrets of R12.2 upgrade_PPT
Oracle EBS R12.2 - Deployment and System Administration
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
E business suite r12.2 changes for database administrators
What is new on 12c for Backup and Recovery? Presentation
Oracle applications r12.2, ebr, online patching means lot of work for devel...
Oracle Architecture
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Architecting for ADF Mobile Integration
Oracle 12c Architecture
Adop and maintenance task presentation 151015
Ebs12.2 online patching(aioug_aug2015)
What’s New in Oracle E-Business Suite R12.2 for Database Administrators?
Oracle E-Business Suite R12.2.6 on Database 12c: Install, Patch and Administer
Preparing for EBS R12.2-upgrade-full
Oracle ADF Architecture TV - Design - Architecting for PLSQL Integration
Application Continuity
Oracle Applications R12 Architecture
Concurrent Processing Performance Analysis for Apps DBAs
Overview of oracle database
COLLABORATE 16 Demystifying secrets of R12.2 upgrade_PPT
Ad

Similar to Cdb part i (20)

PDF
Exploring Oracle Database 12c Multitenant best practices for your Cloud
PPTX
Using oracle12c pluggable databases to archive
PDF
Oracle database 12c intro
PPTX
Simplify Consolidation with Oracle Pluggable Databases
PPTX
Oracle 12c - Multitenant Feature
PDF
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
PDF
Oracle 12c PDB insights
PDF
COUG_AAbate_Oracle_Database_12c_New_Features
PDF
Oracle 12c and its pluggable databases
PPTX
Oracle 12c Multi Tenant
PPTX
Presentation day1oracle 12c
PPTX
Presentation day4 oracle12c
PPTX
Presentation day2 oracle12c
PPT
173955573244324324324424322adsadsaasd.ppt
PDF
Plugging in oracle database 12c pluggable databases
PDF
154090896 installation-of-oracle-database-12c
PDF
2017 10-oow-fma-application-containers-v01-final
PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
PPTX
Simplify Consolidation with Oracle Database 12c
PPTX
Presentation day5 oracle12c
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Using oracle12c pluggable databases to archive
Oracle database 12c intro
Simplify Consolidation with Oracle Pluggable Databases
Oracle 12c - Multitenant Feature
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Oracle 12c PDB insights
COUG_AAbate_Oracle_Database_12c_New_Features
Oracle 12c and its pluggable databases
Oracle 12c Multi Tenant
Presentation day1oracle 12c
Presentation day4 oracle12c
Presentation day2 oracle12c
173955573244324324324424322adsadsaasd.ppt
Plugging in oracle database 12c pluggable databases
154090896 installation-of-oracle-database-12c
2017 10-oow-fma-application-containers-v01-final
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Simplify Consolidation with Oracle Database 12c
Presentation day5 oracle12c
Ad

Recently uploaded (20)

PPTX
Business Acumen Training GuidePresentation.pptx
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPT
ISS -ESG Data flows What is ESG and HowHow
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPT
Quality review (1)_presentation of this 21
PDF
Lecture1 pattern recognition............
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
Qualitative Qantitative and Mixed Methods.pptx
Business Acumen Training GuidePresentation.pptx
Fluorescence-microscope_Botany_detailed content
STUDY DESIGN details- Lt Col Maksud (21).pptx
Clinical guidelines as a resource for EBP(1).pdf
oil_refinery_comprehensive_20250804084928 (1).pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Data_Analytics_and_PowerBI_Presentation.pptx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Miokarditis (Inflamasi pada Otot Jantung)
ISS -ESG Data flows What is ESG and HowHow
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Introduction-to-Cloud-ComputingFinal.pptx
Quality review (1)_presentation of this 21
Lecture1 pattern recognition............
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Qualitative Qantitative and Mixed Methods.pptx

Cdb part i

  • 1. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. <Insert Picture Here> <Insert Picture Here> Oracle Database 12c – Pluggable Databases – Part I
  • 2. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Using the Player Course Outline Player Controls Print Version Change View
  • 3. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Road Map
  • 4. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Road Map PART – II PART – I PART – III
  • 5. PROPERTIES Allow user to leave interaction: After viewing all the steps Show ‘Next Slide’ Button: Show upon completion Completion Button Label: Next Slide
  • 6. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Why Take This Course? • What’s in it for me? • What are challenges I face on the job? • How can this help me do my job better?
  • 7. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. <Insert Picture Here> <Insert Picture Here> Oracle Database 12c – Basics of Container and Pluggable Databases
  • 8. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Road Map PART – I
  • 9. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Challenges Many Oracle customers have large numbers of “departmental” applications built on Oracle RDBMS. • Do NOT use a significant percentage of the hardware on which they are deployed • Have instance and storage overhead preventing large numbers of “departmental” databases from being placed on the same physical and storage server • Are NOT sufficient complexity to require 100% of the attention of a full time administrator • Do require significant time to patch or upgrade all applications
  • 10. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Benefits of 12c Pluggable Databases • Operates multiple monolithic databases in a centrally managed platform to lower costs: – Less instance overhead – Less storage cost • Reduces DBA resources costs and maintains security – No application changes – Fast and easy provisioning – Time saving for patching and upgrade – Maintain separation of duties between: – Different application administrators – Application administrators and DBA – Users within application • Provides isolation
  • 11. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Benefits of 12c Pluggable Databases • Ensures full backwards-compatibility with non-CDB • Fully operates with RAC • Is integrated with Enterprise and Resource Manager • Allows central management and administration of multiple databases – Backups / Disaster recovery – Patching and Upgrades
  • 12. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. User Data is Added In a non-CDB, user data is added: • The metadata is mixed with the Oracle supplied data in the data dictionary. … OBJ$ TAB$ SOURCE$ … EMP DEPT Oracle System data mixed with User metadata User Data
  • 13. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Separating System and User Data … OBJ$ TAB$ SOURCE$ … EMP DEPT User Metadata only User Data … OBJ$ TAB$ SOURCE$ Oracle Metadata only Container Database Container for System Container for Application
  • 14. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Naming the Containers within Container Database • The Oracle supplied container is called the root container • User container is a pluggable database (PDB) Oracle Metadata only root Container Database PDB User Metadata only User Data
  • 15. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Provisioning Pluggable Databases Seed PDB New empty PDB Imagine this when the datafiles are on a filesystem that supports copy-on-change root Four methods: • Create new PDB from PDB$SEED pluggable database • Plug in a non-CDB • Clone a PDB from another PDB into the same or another CDB • Plug an unplugged PDB into another CDB Container Database
  • 16. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Container Database Architecture Instance System Global Area Process Structures Server Instance Container database root container Datafiles Redo Log files Control files UNDO TEMP SYSTEM SYSAUX seed PDB Datafiles SYSTEM SYSAUX EXAMPLE SALES PDB SYSTEM SYSAUX TBS2 HR PDB Data files TEMPO Datafiles TEMP2 PDBid2 PDBid3 PDBid4 PDBid2 PDBid4 Single DB shares: • Background processes • Shared/process memory • Oracle metadata • Redo log files • Control files • Some datafiles
  • 17. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Terminology • Common vs Local: – Users – Roles – Privileges – Objects • CDB vs PDB level: – Global Resource Manager plan vs local RM plan – Unified audit at CDB or PDB level – Xstream at CDB or PDB level
  • 18. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Common and Local Users Container Database root PDB_HR PDB_SALES Table HR.REGIONS USERNAME COMMON SYS YES SYSTEM YES CDBA YES HR YES View CDB_USERS Adding a common user, involves adding a description of that user in the root and in every PDB. Certain operations, such as ALTER SESSION SET CONTAINER can only be executed by common users. Then depending on the way the privileges are granted, common users can or cannot perform operations. A local user is a traditional user, known only in its own PDB. View DBA_USERS USERNAME COMMON SYS YES SYSTEM YES CDBA YES HR YES SALES NO USERNAME COMMON SYS YES SYSTEM YES CDBA YES HR YES HR_MGR NO View DBA_USERS Table SALES.COUNTRIES Tablespace EXAMPLE Tablespace EXAMPLE Tablespace EXAMPLE
  • 19. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. CDB_xxx All of the objects in the container database across all PDBs USER_xxx Objects owned by the current user ALL_xxx Objects accessible by the current user DBA_xxx All of the objects in a container or pluggable database Data Dictionary Views • CDB_pdbs : All PDBS within CDB • CDB_tablespaces : All tablespaces within CDB • CDB_users : All users within CDB (common and local) DBA dictionary views providing information within PDB: SQL> SELECT view_name FROM dba_views WHERE view_name like 'CDB%'; SQL> SELECT table_name FROM dict WHERE table_name like 'DBA%';
  • 20. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Backup • Whole CDB backup: control files, root and PDBs datafiles • Whole PDB backup: PDBs datafiles • Hot backups: not available in Beta1 – PDB level Backup/Recovery/Flashback Database
  • 21. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Recovery • Instance recovery: CDB level only • Complete media recovery from file loss or damage – CDB level – PDB level: not available in Beta1 – Tablespace level: same as for non-CDB • Incomplete media recovery after file loss or corruption – CDB level: same as for non-CDB – PDB level not available in Beta1 – TSPITR for root tablespaces ONLY except SYSTEM, UNDO, SYSAUX • Flashback database – CDB level only – PDB level not available in Beta1 • Block recovery: no change Backup/Recovery/Flashback Database
  • 22. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Migrating pre-12c Databases to 12c CDB Container Database CDB1 root Data files Redo Log files Control files Create PDB1 from ORCL ORCL Datafiles Control files Redo Log files expdp Dump file PDB1 Data files impdp There are two methods: Method 1 Upgrade a pre-12c database to 12c Plug-in the non-CDB into a CDB using different methods Or Method 2 1. Pre-create a PDB in CDB 2. Use 11g expdp / 12c impdp or 2. Use replication between the non-CDB and the PDB ORCL Datafiles Control files Redo Log files 1 2 11g 12c 2 1 Replication DBMS_PDB XML file
  • 23. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. • One character set for all PDBs (Unicode recommended) • PDB initialization parameters but a single SPFILE • No PDB qualified database object names – SELECT * FROM HR:apps.tab1 – Use DB Links: SELECT * FROM apps.tab1@HR • Data Guard at CDB level • Database Vault per PDB only • Unified audit both at CDB and PDB level Impacts
  • 24. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 25. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Lesson Summary In this first lesson, we discussed: • The benefits for a container database • The architecture of a container database • The root container and the pluggable database container • The methods for provisioning new pluggable databases • The backup and recovery capabilities and upgrade methods • The impacts PART – I
  • 26. PROPERTIES On passing, 'Finish' button: Goes to Next Slide On failing, 'Finish' button: Goes to Next Slide Allow user to leave quiz: At any time User may view slides after quiz: At any time
  • 27. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. <Insert Picture Here> <Insert Picture Here> Oracle Database 12c – Configuring and Creating a Container Database
  • 28. Copyright © 2011, Oracle and/or its affiliates.All rights reserved. Road Map PART – I
  • 29. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Create a container database: • To consolidate many pre-12.1 non-CDBs into a single, larger database • To prepare a container – For plugging any future new application – For testing applications – For diagnosing application performance – For unplugging/plugging operations • To simplify and reduce time for patching and upgrade Goals
  • 30. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Instance SGA Process Structures Instance Container Database CDB1 root container seed pluggable database Steps to Create a Container Database 2 1 Container Database CDB1 Datafiles Control files UNDO SYSTEM SYSAUX Redo Log files SYSTEM TEMP1 TEMP SYSAUX initCDB1.ora 3 4 Execute catalog.sql catproc.sql
  • 31. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. A CDB has new characteristics compared to non-CDBs: • Two containers: – The root (CDB$ROOT) – The seed PDB (PDB$SEED) • Several services: one per container – Name of root service = name of the CDB: cdb1 • Common users in root and seed: SYS,SYSTEM … • Common privileges granted to common users • Common roles • Tablespaces and datafiles associated to each container: – root: SYSTEM contains system-supplied metadata and no user data, SYSAUX – seed: SYSTEM, SYSAUX After CDB Creation – What’s New in CDB
  • 32. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. CDB_xxx All of the objects in the container database (new column CON_ID) USER_xxx Objects owned by the current user in a PDB ALL_xxx Objects accessible by the current user in a PDB DBA_xxx All of the objects in the root or a pluggable database Data Dictionary Views – CDB_xxx and V$xxx CDB dictionary views provide information across PDBs: • CDB_pdbs : all PDBS within the CDB • CDB_tablespaces : all tablespaces within the CDB • CDB_data_files : all datafiles within the CDB • CDB_users : all users within the CDB (common and local) SQL> SELECT view_name FROM dba_views 2 WHERE view_name like 'CDB%';
  • 33. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 34. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. In this second lesson, we discussed: • Create a container database • Explore CDB instance, files and PDB structures Lesson Summary PART – I
  • 35. PROPERTIES On passing, 'Finish' button: Goes to Next Slide On failing, 'Finish' button: Goes to Next Slide Allow user to leave quiz: At any time User may view slides after quiz: At any time
  • 36. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. <Insert Picture Here> <Insert Picture Here> Oracle Database 12c – Pluggable Databases Provisioning
  • 37. Copyright © 2011, Oracle and/or its affiliates.All rights reserved. Road Map PART – I
  • 38. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Click to edit Master title style Goals Why provisioning pluggable databases in a CDB ? • To consolidate many non-CDBs into a single, larger database, the CDB – To lower costs – To better exploit hardware and DBA resources • To avoid the creation of new databases and instances when: – Implementing new application – Testing new applications – Diagnosing new application performance • To simplify and reduce time for patching and upgrade
  • 39. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Click to edit Master title style Provisioning New Pluggable Databases Four methods: • Create a new PDB from the seed PDB • Plug a non-CDB in a CDB • Clone a PDB from another PDB: – Into the same CDB – Into another CDB • Plug an unplugged PDB into another CDB
  • 40. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Method 1 – Create New PDB from PDB$SEED Container Database CDB1 root Data files/ Tempfiles Redo Log files Control files UNDO TEMP PDB$SEED Data files SYSAUX USERS SYSTEM SYSAUX PDB1 Data files Create PDB1 from PDB$SEED • Copies the datafiles from PDB$SEED datafiles • Creates tablespaces SYSTEM, SYSAUX • Creates a full catalog including metadata pointing to Oracle supplied objects • Creates common users: – Superuser SYS – SYSTEM • Optionally creates a local user granted local PDB_DBA role • Creates a new default service SYSAUX SYSTEM SYSTEM
  • 41. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Steps – With FILE_NAME_CONVERT Steps to create a new PDB from the seed using FILE_NAME_CONVERT clause: 1. Connect to the root as a common user with CREATE PLUGGABLE DATABASE system privilege: 2. Use views to verify: SQL> CREATE PLUGGABLE DATABASE pdb1 2 ADMIN USER admin1 IDENTIFIED BY p1 ROLES=(CONNECT) 3 FILE_NAME_CONVERT = (’PDB$SEEDdir’,’PDB1dir’); SQL> CONNECT / AS SYSDBA SQL> SELECT * FROM cdb_pdbs; SQL> SELECT * FROM cdb_tablespaces; SQL> SELECT * FROM cdb_data_files; SQL> ALTER PLUGGABLE DATABASE pdb1 OPEN; SQL> CONNECT sys/password@pdb1 AS SYSDBA SQL> CONNECT admin1/p1@pdb1
  • 42. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Method 2 – Clone PDBs within same CDB Container Database CDB1 root Data files/ Tempfiles Redo Log files Control files PDB$SEED Data files / Tempfiles PDB1 Data files Create PDB3 from PDB1 1. In init.ora, set DB_CREATE_FILE_DEST= 'PDB3dir' or PDB_FILE_NAME_CONVERT='PDB1dir, PDB3dir' 2. Connect to the root as a common user with CREATE PLUGGABLE DATABASE privilege 3. Quiesce PDB1: Close PDB1 first, then 4. Clone PDB3 from PDB1: 5. Open PDB3: PDB3 Data files PDB3 owns: • SYSTEM, SYSAUX tablespaces • Full catalog • SYS, SYSTEM common users: • Same local administrator name • New service name SQL> ALTER PLUGGABLE DATABASE 2 pdb1 OPEN READ ONLY; SQL> CREATE PLUGGABLE DATABASE 2 pdb3 FROM pdb1; SQL> ALTER PLUGGABLE DATABASE 2 pdb3 OPEN;
  • 43. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Migrating pre-12.1 Databases to 12.1 CDB There are two methods: 1. Upgrade an existing pre-12.1 database to 12c 2. Plug-in non-CDB into a CDB Or 1. Pre-create a PDB in CDB 2. Use 11g expdp / 12c impdp or 2. Use replication between non-CDB and PDB
  • 44. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Migrating pre-12.1 Databases to 12.1 CDB First method: 1. Upgrade an existing 11g database to 12c 2. Plug-in the non-CDB into a CDB using: • Export/import – TTS – TDB – Without transportable • Replication • DBMS_PDB.DESCRIBE to generate XML file Container Database CDB1 root Data files/ Tempfiles Redo Log files Control files Create PDB1 from ORCL ORCL Datafiles Control files Redo Log files expdp Dump file PDB1 Data files impdp ORCL Datafiles Control files Redo Log files 1 2 11g 12c Replication XML file
  • 45. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Dropping a PDB Container Database CDB1 root Data files/ Tempfiles Redo Log files Control files File2 TEMP PDB$SEED Data files File5 File6 File7 File4 File1 File3 PDB1 Data files File8 Drop PDB1 • If KEEP DATAFILES (default): – Retain datafiles – Can be plugged in another or same CDB • If INCLUDING DATAFILES: – Removes PDB1 datafiles • Updates controlfiles • Cannot drop seed PDB File9 File10 PDB4 Data files SQL> ALTER PLUGGABLE DATABASE 2 pdb1 CLOSE; SQL> DROP PLUGGABLE DATABASE 2 pdb1 [INCLUDING DATAFILES]; … File7 File8 File9 File10 …
  • 46. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 47. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 48. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 49. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 50. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide
  • 51. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Lesson Summary In this third lesson, we discussed: • The different methods to provision new pluggable databases • The migration methods • The impact of dropping a pluggable database PART – I
  • 52. PROPERTIES On passing, 'Finish' button: Goes to Next Slide On failing, 'Finish' button: Goes to Next Slide Allow user to leave quiz: At any time User may view slides after quiz: At any time
  • 53. Copyright © 2012, Oracle and/or its affiliates.All rights reserved. Course Summary In this first part of the course, we discussed: PART – II PART – I PART – III PART – II
  • 54. PROPERTIES On passing, 'Finish' button: Goes to Next Slide On failing, 'Finish' button: Goes to Next Slide Allow user to leave quiz: At any time User may view slides after quiz: At any time
  • 55. PROPERTIES Allow user to leave interaction: Anytime Show ‘Next Slide’ Button: Show always Completion Button Label: Next Slide