Presentation is loading. Please wait.

Presentation is loading. Please wait.

Private Database Cloud Database Consolidation Deep Dive in PDB Nitin Vengurlekar Viscosity – CTO/Cloud Charles Kim Viscosity –

Similar presentations


Presentation on theme: "Private Database Cloud Database Consolidation Deep Dive in PDB Nitin Vengurlekar Viscosity – CTO/Cloud Charles Kim Viscosity –"— Presentation transcript:

1

2 Private Database Cloud Database Consolidation Deep Dive in PDB Nitin Vengurlekar Viscosity – CTO/Cloud Evangelist@dbcloudshifu Charles Kim Viscosity – CEO/Oracle Architect@racdba

3 Who am I and Why am even speaking 18 Years with Oracle 13 Years in RAC/ASM development and Product Management Self Proclaimed “Private Database Cloud” Evangelist Follow me on Twitter - @dbcloudshifu

4 Program Agenda What is Private Database Cloud Why Database Cloud Consolidation Private Database Cloud deployment models Pluggable Database Deep Dive PDB and RAC – A Perfect Deployment Model

5 NIST Definition of Cloud Computing Cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. This cloud model promotes availability and is composed of: Source: NIST Definition of Cloud Computing v15NIST Definition of Cloud Computing v15 3 Service Models SaaS PaaS IaaS 4 Deployment Models Public Cloud Private Cloud Community Cloud Hybrid Cloud 5 Essential Characteristics On-demand self-service Resource pooling Rapid elasticity Measured service Broad network access

6 Customers Have a Choice of Clouds Own & Operate, Use Managed Services, Subscribe ManagedBuildSubscribe Customer owns. Service provider manages. Either may host. Customer owns, hosts and manages. Customer subscribes. Service provider hosts and manages. Managed Cloud ServicesPrivate CloudPublic Cloud Source-Oracle

7 Customers Have a Choice of Clouds IaaS, PaaS or SaaS Application Platform Customizations Application Customizations Consumer Service Provider IaaS Cloud SaaS Cloud PaaS Cloud IT ProfessionalDeveloperBusiness End User Different Users Source-Oracle

8 Reduce IT Costs Reduce Comple- xity Increase Quality of Service Increase Agility Database Cloud Business Drivers Lower: CapEx Servers Storage OpEx Maintenance Management Reduce: Configurations Services Standardize: OS DB Versions Enhance: IT service time Availability Security Enable: Online changes Rapid response Faster Time to market Source-Oracle

9 Private Database Cloud Architectures Common building blocks are shared server and storage pools Platform ERP DW CRM DB Platform DB Database Cloud Database Consolidation Share server pool Real Application Clusters Platform ERP DW CRM Platform DB Database Cloud Schema Consolidation Share database instances Real Application Clusters Infrastructure Cloud Server Consolidation Deploy in dedicated VMs Server virtualization Hypervisor CRM DW ERP OS DB OS DB OS DB Hypervisor Source-Oracle

10 Infrastructure Cloud Server - Provision a Database in a VM Reasons for adoption –Simple to implement –Excellent isolation –Mixed workloads –As-is consolidation –Legacy support Customer concerns –Lower consolidation density –Lower ROI –Performance (latency) –Managing sprawl Source-Oracle

11 Database Cloud Database Consolidation – Provision Database Reasons for adoption –Consolidation density –Good ROI –Performance –Supports any app Customer concerns –Requires OS standardization –Database only OS ERP DW CRM DB OS DB Source-Oracle

12 Private Database Cloud Database – Provision Schema Reasons for adoption –Most efficient –Extremely fast provisioning –Best ROI –Performance –Efficient memory use Customer concerns –App qualification required –Requires OS and DB standardization –Isolation Performance - Resource Management Security - Availability Operational - Namespace issues OS ERP DW CRM OS DB Source-Oracle

13 Private Database Cloud Deployment Schema Consolidation - Provision a Schema Most efficient –Highest consolidation density. Capability to consolidate large number of applications. –Efficient use of memory. Single large SGA opposed to several disparate SGAs –Minimizes items to manage. Less OS, databases, and configurations to manage –Reduces overall operational costs and overhead Extremely fast provisioning –Provisioning is simply a schema and tablespace creation Performance –Native performance OS ERP DW CRM OS DB Source-Oracle

14 Database Cloud Business Drivers

15 Next Generation Consolidation Pluggable Database - Database/Schema Source-Oracle

16 Reasons for Adoption –No application validation required –Fast Provisioning Fast creation of empty PDB Fast clone of a PDB for testing Fast plug PDB for migrations & upgrades –High Level of Consolidation –Excellent Performance : Resource ratio Customer Concerns –Available with 12.1 –New technology to adopt CRM DW ERP CDB PDB Private Database Clouds New in 12c – Provision a PDB in a Container DB

17 Private Database Cloud – Pluggable Database Concepts CDB –The name you give it will be name of the instance (SID). –The CDB database owns the SGA and running processes. –Can contain upto 252 PDBs –Can have many CDBs on the same database server (each with its own PDBs). Root CDB (cdb$root) contains the data dictionary The seed PDB (PDB$SEED) is a Oracle supplied system template that the CDB can use to create new PDBs. The seed PDB is named PDB$SEED. One cannot add or modify objects in PDB$SEED.

18 Private Database Cloud – Pluggable Database Concepts PDB (Pluggable Database) –Also referred to Containers –The PDB are sub-containers (databases) serviced by CDB resources –PDB has mobility - unplug and plug 12c databases into and out of CDBs. –Can “create like” new PDBs from existing PDB, like full snapshots. –Can be created or managed using DBCA, OEM, or command line –SQL statement execution is scoped to the container (PDB) Con Id (Container ID – con_id) –Scope is defined by the container id –Container ID is established and tagged at session creation/connection –Defines level of isolation –Permeates across all aspects of Data Dictionary and Oracle code layers

19 Private Database Cloud – Pluggable Database Concepts Non-CDB –Like traditional database that is not capable of housing PDB –Still has GUID like a CDB –If it is 12c database (or after upgraded) it can be plugged-in to a CDB

20 Private Database Cloud – Pluggable Database Concepts – Who Owns What… Says the CDB Scope is key in understanding and managing PDB –Where is data stored or referenced; eg, at root or PDB –How can PDB access its data; scope of access –Can data be portable – moved with unplug/plug operations

21 Private Database Cloud – Pluggable Database Concepts – Who Owns What… Says the CDB Management and Operation –Job scheduling -> container specific; e.g., root jobs scoped within CDB, jobs scoped in container –ASH data is stored within PDB and is mobile –PDBs inherit init.ora parameters from CDB, some parameters can be set at PDB, but no mobility –Features vary content placement (container) at specific level and have of scope of access AWR is stored in root, PDB can access its own PDB AWR content ASH SQL Tuning Advisor data is stored in root and not mobile

22 Private Database Cloud – Pluggable Database Concepts – Who Owns What… Says the CDB FEATUREDATA LOCATIONSCOPE OF ACCESSMOBILITY AWRCDB ASHCDB OR PDBPDBYES STATSPACKCDB OR PDB SQL TUNING ADVISORCDB

23 Private Database Cloud – Pluggable Database Concepts – Who Owns What… Says the CDB Instance stuff –CDB owns all instance level real estate – semaphore, shm segments –Memory - CDB only manages and maintains the memory When consolidating, all PDB memory requirements will rollup into CDB..plan accordingly –One alert.log, ADR –One ORACLE_HOME –One SPFile  though PDB can have PDB level settings See parameters with IsPDB_Modifiable = ‘TRUE’

24 Private Database Cloud – Pluggable Database Concepts – Who Owns What… Says the CDB Database Stuff –CDB has its own set of System and SYSAUX –CDB owns the controlfiles, online/archive redo logs, undo and default Temp –PDB can have its own Temp –DataGuard at CDB level –Oracle-supplied objects such as views, PL/SQL, etc., are shared across all PDBs using object “stubs”

25 Private Database Cloud – Pluggable Database Concepts – Who Owns What… Says the CDB Tablespace and DataFiles –Root has its own set of tablespaces & datafiles –PDB has its own System and SYSAUX, as well as optional TEMP –PDB has its own set of tablespaces & datafiles –Each PDB has its own TDE master key – can also be managed by CDB using “Administer Key Management “ capability –DataVault employed at the PDB level

26 Private Database Cloud – Pluggable Database Creation Two methods to create a container database –The usual “ Create Database” script Use starting point init.ora parameter with ENABLE_PLUGGABLE_DATABASE parameter set –OUI (DBCA) method Both methods build a CDB capable database with Data Dictionary to support it

27 Private Database Cloud – Pluggable Database OUI Workflow

28

29

30 Private Database Cloud – Pluggable Database CDB First verify that we are truly on 12c Oracle database SQL> select instance_name, version, status, con_id from v$instance; INSTANCE_NAME VERSION STATUS CON_ID ---------------- ----------------- ------------ ---------- yoda 12.1.0.1.0 OPEN 0 The v$database view tells us that we are dealing with a CDB based database CDB$ROOT@YODA> select cdb, con_id from v$database; CDBCON_ID --- ---------- YES 0 Or a more elegant way: CDB$ROOT@YODA> select NAME, DECODE(CDB, 'YES', 'Multitenant Option enabled', 'Regular 12c Database: ') "Multitenant Option ?", OPEN_MODE, CON_ID from V$DATABASE; NAME Multitenant Option ? OPEN_MODE CON_ID --------- -------------------------- -------------------- ---------- YODA Multitenant Option enabled READ ONLY 0

31 Private Database Cloud – Pluggable Database CDB There are alot of new views, tables, and commands to support PDB/CDB. v$PDBS, v$CONTAINERS, DBA_PLUGGABLE_DATABASE, and CDB_PDBS views The SQLPlus command con_name (container name) shows the container and the con_id we are connected to: CDB$ROOT@YODA> show con_name CON_NAME ------------------------------ CDB$ROOT CDB$ROOT@YODA> show con_id CON_ID ------------------------------ 1

32 Private Database Cloud – Pluggable Database CDB Let's see what PDBs that are created in this CDB and their current state: CDB$ROOT@YODA> select CON_ID,DBID,NAME,TOTAL_SIZE from v$pdbs; CON_ID DBID NAME TOTAL_SIZE ---------- ---------- ------------------------------ ---------- 2 4066465523 PDB$SEED 283115520 3 483260478 PDBOBI 0 CDB$ROOT@YODA> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- -------------------- ---------- 2 PDB$SEED READ ONLY 3 PDBOBI MOUNTED Recall from OUI that we created a PDB (pdbobi) when we specified the Pluggable Database Feature on install. Also, a PDB$SEED got created as part of that Install process Now lets's connect to the two different PDBs and see what they got!! You really shouldn't ever connect to PDB$SEED, since its just used as a template, but we're just curious :-)

33 Private Database Cloud – Pluggable Database CDB Now lets's connect to the two different PDBs and see what they got!! You really shouldn't ever connect to PDB$SEED, since its just used as a template, but we're just curious :-) CDB$ROOT@YODA> alter session set container=PDB$SEED; Session altered. CDB$ROOT@YODA> select name from v$datafile; NAME -------------------------------------------------------------------------------- +PDBDATA/YODA/DATAFILE/undotbs1.260.823892155 +PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/system.271.823892297 +PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.270.823892297 As you can see that PDB$SEED houses the template tablespaces -> System, Sysaux, and Undo tablespaces The SEED database is used for Cloning for new PDBs

34 Private Database Cloud – Pluggable Database CDB If we connect back to the root-CDB, we see that it houses essentially the traditional database tablespaces (like in pre-12c days). CDB$ROOT@YODA> alter session set container=cdb$root; Session altered. CDB$ROOT@YODA> select name from v$datafile; NAME -------------------------------------------------------------------------------- +PDBDATA/YODA/DATAFILE/system.258.823892109 +PDBDATA/YODA/DATAFILE/sysaux.257.823892063 +PDBDATA/YODA/DATAFILE/undotbs1.260.823892155 +PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/system.271.823892297 +PDBDATA/YODA/DATAFILE/users.259.823892155 +PDBDATA/YODA/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.270.823892297 +PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/system.276.823892813 +PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/sysaux.274.823892813 +PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/users.277.823892813 +PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE/example.275.823892813

35 Private Database Cloud – Pluggable Database DBCA Workflow

36

37

38

39 Private Database Cloud – Pluggable Database A Peek at PDB Note, that when you create the PDB, it is initially in mounted mode with a status of NEW. View the OPEN MODE status of a PDB by querying the OPEN_MODE column in the V$PDBS view or view the status of a PDB by querying the STATUS column of the CDB_PDBS or DBA_PDBS view Let's connect to our user PDB (pdbobi) and see what we can see :-) CDB$ROOT@YODA> alter session set container=pdbobi; Session altered. CDB$ROOT@YODA> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ----------------- ----------- 3 PDBOBI MOUNTED Place PDBOBI in Read Write mode. CDB$ROOT@YODA> alter pluggable database pdbobi open; Pluggable database altered. All PDBs can be opened at once using CDB$ROOT@YODA> alter pluggable database all open;

40 Private Database Cloud – Pluggable Database DBCA Manage PDB Workflow

41 Private Database Cloud – Pluggable Database DBCA – Create a Fileset Workflow

42

43

44 Private Database Cloud – Pluggable Database DBCA Manage PDB Workflow

45

46

47

48

49

50

51 Private Database Cloud – Pluggable Database Migrating, Cloning PDBs Options to migrate non-CDB into PDB-CDB Logical pre-create a PDB using Clone DataPump out of non-CDB into CDB Physical (requires that source is 12.1 database) Migrate using manifest file Create a manifest file of source

52 Private Database Cloud – Pluggable Database Unplug/Plug PDBs Unplug / plug unplug into '/u01/app/oracle/oradata/endor.xml' create pluggable database Endor using '/u01/app/oracle/oradata/endor.xml'

53 Private Database Cloud – Pluggable Database CDB Let's create a new clone from an existing PDB, but with a new path CDB$ROOT@YODA> create pluggable database PDBvader from PDBOBI FILE_NAME_CONVERT=('+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE','+PDBDATA'); create pluggable database PDBvader from PDBOBI FILE_NAME_CONVERT=('+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE','+PDBDATA') * ERROR at line 1: ORA-65040: operation not allowed from within a pluggable database Hmm…..remember we were still connected to PDBOBI. You can only create PDBs from root (and not even from pdb$seed). So connect to CDBROOT CDB$ROOT@YODA> show con_name CON_NAME ------------------------------ PDBOBI CDB$ROOT@YODA> create pluggable database PDBvader from PDBOBI FILE_NAME_CONVERT=('+PDBDATA/YODA/DD7D8C1D4C234B38E04325AAE80AF577/DATAFILE','+PDBDATA'); Pluggable database created.

54 Private Database Cloud – Pluggable Database CDB create pluggable database corasant as clone using '/u02/app/oracle/product/12.1.0/db/assistants/dbca/templates/Dagobah_ENDOR.xml' source_file_name_convert = ('+FRA/DAGOBAH/F13F13D3C04050F0E0430B2910AC5929/TEMPFILE/temp.281.838253631','+PDBDATA/corasant_temp01. dbf', '+FRA/DAGOBAH/F13F13D3C04050F0E0430B2910AC5929/DATAFILE/users.282.838253665','+PDBDATA/corasant_users.dbf ', '+FRA/DAGOBAH/F13F13D3C04050F0E0430B2910AC5929/DATAFILE/sysaux.279.838253631','+PDBDATA/corasant_sysaux.d bf', '+FRA/DAGOBAH/F13F13D3C04050F0E0430B2910AC5929/DATAFILE/system.280.838253631','+PDBDATA/corasant_system.d bf') NOCOPY Fri Jan 31 01:58:04 2014 This instance was first to open pluggable database CORASANT (container=5) Deleting old file#8 from file$ Deleting old file#9 from file$ Deleting old file#10 from file$ Adding new file#17 to file$(old file#8) Adding new file#18 to file$(old file#9) Adding new file#19 to file$(old file#10) Successfully created internal service corasant at open ALTER SYSTEM: Flushing buffer cache inst=2 container=5 local

55 A View of the Private Database Cloud Cloud, An Aggregation of Cloud Pools Dev/test Cloud Pool Infrastructure Cloud Cloud Pool Schema Consolidation 11gR1 Cloud Pool Database Consolidation Cloud Pool Infrastructure Cloud 11gR2 Cloud Pool Exadata - Database Consolidation Cloud Pool Schema Consolidation

56 Cloud Architectural Assessment Pick the architecture that best suits your needs Business Value Infrastructure Consolidation Database Consolidation Schema Consolidation PDB Consolidation ImplementationEasy Difficult*Easy Application SuitabilitySomeAllSomeMost IsolationHighestHighLimitedHigh AvailabilityHighHighest ScalabilityLimitedExcellent Consolidation DensityLowHighHighestHigh ROILowHighHighestHigh

57 RAC AND PDB

58 Private Database Cloud – Pluggable Database RAC and Pluggable Databases RAC Overview Clusterware Overview Server Pool Overview

59 Private Database Cloud – Pluggable Database RAC and PDB Core Components RAC – provides scalability, availability and workload distribution Policy Managed Databases – logical separation of Servers and Databases Services Each PDB has its default Service. Create additional Services to map workload and client access Services can be uniform or singleton

60 PDB-RAC Configuration 1-1 ASM to Server Shared Disk Groups

61 Oracle 12c: Pluggable DBs and Server Pools Oracle Clusterware 12cR1 AR Service AP Service ERP SP SALES Service Sales SPHR SPFree SP Oracle PDB OS Service OS Service HR Service HR Service Oracle CDB 12cR1 Oracle PDB

62 Private Database Cloud – Pluggable Database CDB PDB most pragmatic in RAC configuration A PDB is essentially a RAC Service RAC Services can be managed with Oracle Clusterware WLM/QoS PDBs can be RAC One Node or Multi-node RAC Policy Managed Configuration always greater multiple CDB Easily convert a single instance (12.1) database to RAC by simply plugging in SI db into CDB Oracle Clusterware Server Pools allow greater HA management and workload isolation Allocate and map CDBs or Services to server pools

63 Viscosity is a group of experts specializing in cloud architecture and managed services. 63

64 More detailed information is available at viscosityna.com or by talking to a real person at 469.444.1380 64


Download ppt "Private Database Cloud Database Consolidation Deep Dive in PDB Nitin Vengurlekar Viscosity – CTO/Cloud Charles Kim Viscosity –"

Similar presentations


Ads by Google