oracle multitenant - organized by orient itm - 12 jul 2014

47
Oracle Multitenant Mahir M. Quluzade Insert Picture Here Organized by ORIENT ITM 12 July 2014

Upload: mahir-m-quluzade

Post on 08-Sep-2014

478 views

Category:

Technology


2 download

DESCRIPTION

Oracle Multitenant Architecture, Oracle Database 12c

TRANSCRIPT

Page 1: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

Oracle MultitenantMahir M. Quluzade

Insert Picture Here

Organized by ORIENT ITM 12 July 2014

Page 2: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

2 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Agenda

Rethinking Architecture for the Database Multitenant Architecture Capabilities Enabled Managing Shared Resources Upgrading to Multitenant

Page 3: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

3 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

About me

Broad member of AZEROUG (Azerbaijan Oracle User Group) OCE, RAC 11g and Grid infrastructure OCP Database 11g Administrator OCE Database SQL Author of OTN Articles and OTech Magazine Central Bank - Oracle DBA Oracle Blog : http//www.mahir-quluzade.com

Page 4: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

4 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Oracle Database Architecture

Oracle Instance– SGA & PGA – Background Processes

Oracle Database – Control Files– Data Files – Redo Logs (Online and Archived)– Parameter and Password file

Pre-12c Oracle Database

Database ServerMemory

BackgroundProcesses

DatabaseFiles

Page 5: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

5 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Oracle Database ArchitectureRequires memory, processes and database files

System Resources

ERPMemory

BackgroundProcesses

DatabaseFiles

CRMMemory

BackgroundProcesses

DatabaseFiles

DWMemory

BackgroundProcesses

DatabaseFiles

Page 6: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

6 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Container Database

New Multitenant ArchitectureMemory and processes required at multitenant container level only

System Resources

ERPMemory

BackgroundProcesses

DatabaseFiles

CRMMemory

BackgroundProcesses

DatabaseFiles

DWMemory

BackgroundProcesses

DatabaseFiles

Page 7: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

7 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

New Multitenant ArchitectureMemory and processes required at multitenant container level only

System Resources

Container Database

Page 8: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

8 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Increasing ConsolidationOracle Database 12g

Schema Consolidation

Container Database

Multitenant Database

Page 9: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

9 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Agenda

Rethinking Architecture for the Database Multitenant Architecture Capabilities Enabled Managing Shared Resources Upgrading to Multitenant

Page 10: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

10 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Multitenant ArchitectureComponents of a Multitenant Container Database (CDB)

Multitenant Container DatabaseROOT

12.1

HCM12.1

DW12.1

CRM12.1

ERP12.1

Pluggable Databases (PDBs)

PDBs

Root

CDB

create database … enable pluggable database

Create CDB

create pluggable database …Create PDB

Page 11: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

11 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Multitenant Architecture

Multitenant architecture can currently support up to 252 PDBs

A PDB feels and operates identically to a non-CDB

You cannot tell, from the viewpoint of a connected client, if you’re using a PDB or a non-CDB

Database Link

Page 12: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

12 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Unplug / plugSimply unplug from the old CDB…

Page 13: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

13 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Unplug / plug

Moving between CDBs is a simple case of moving a PDB’s metadata

An unplugged PDB carries with it lineage, opatch, encryption key info etc

…and plug in to the new CDB…

Page 14: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

14 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Unplug / plugExample

alter pluggable database HCMunplug into '/u01/app/oracle/oradata/…/hcm.xml'

create pluggable database My_PDBusing '/u01/app/oracle/oradata/…/hcm.xml'

Plug

Unplug

Page 15: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

15 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Common Data DictionaryBefore 12.1: dilution over time

Database Created Mature DatabaseTables, Code, Data added

Page 16: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

16 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Data Dictionary Architecture in a CDBOracle Database 12c

OBJ$ TAB$ SOURCE$

EMP DEPT

OBJ$ TAB$ SOURCE$

rootDatabase Metadata Only

PDBUser Metadata Only User Data

Met

adat

a Li

nks

Oracle Database stores metadata about dictionary objects only in the root

– PDB uses Metadata Link to point to the definition of object stored in the root

The data corresponding to a metadata link resides in its PDB

Page 17: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

17 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Multitenant Architecture – Dynamics

PDBs share common SGA andbackground processes

Foreground sessions see only the PDB they connect to

Page 18: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

18 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

CRM HCM ERP BI0

0.51

1.52

2.53

MEMORY

Pluggable Database

GB

CRM HCM ERP BI DW0

0.51

1.52

2.53

MEMORY

Pluggable Database

GB

Multitenant Scalability

Only small increments in memory as additional PDBs are added

CRM HCM ERP0

0.51

1.52

2.53

MEMORY

Pluggable Database

GB

Page 19: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

19 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Files in the CDB

Each PDB has its own set of tablespaces including SYSTEM and SYSAUX

PDBs share UNDO, REDOand control files, (s)pfile

By default the CDB has a single TEMP tablespace but PDBs may create their own

Namespaces

Page 20: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

20 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Users Local users are the successors for

customer-created users in a non-CDB A local user is defined only in a PDB A local user can administer a PDB A common user is defined in the root

and is represented in every PDB A common user can log into any PDB

where it has “Create Session” and can therefore administer a PDB

The Oracle system is owned by common users

Page 21: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

21 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Common Users and Privileges

A common user can be granted privileges locally in a PDB (or root)and therefore differently in each container

A common user can, alternatively, be granted a system privilegecommonly – the grant is made in root and every PDB, present and future

You can create a common role A common role can be granted to a common user commonly Authorization is checked in the container where the SQL is attempted

considering only the privileges that the user has in that container

Authorization is checked in the same way as as pre-12.1

Page 22: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

22 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Page 23: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

23 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Agenda

Rethinking Architecture for the Database Cloud Multitenant Architecture Capabilities Enabled Managing Shared Resources Upgrading to Multitenant

Page 24: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

24 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Manage Many as One with MultitenantBackup databases as one; recover at pluggable database level

DW12.1

CRM12.1

ERP12.1

One Backup

Point-in-time recoveryAt pluggable database level

Multitenant Container Database

Page 25: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

25 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Production Container Database

Manage Many as One with MultitenantOne standby database covers all pluggable databases

HCM12.1

DW12.1

CRM12.1

ERP12.1

Standby Container Database

HCM12.1

DW12.1

CRM12.1

ERP12.1

Page 26: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

26 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Multitenant for Simplified PatchingApply changes once, all pluggable databases updated

Upgrade in-place

Multitenant Container Database

DW12.1

CRM12.1

ERP12.1

12.X

12.X

12.X

Page 27: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

27 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Multitenant for UpgradesFlexible choice when patching & upgrading databases

Original Container Database (12.1) Upgraded Container Database (12.X)

DW12.X

CRM12.X

DW12.1

CRM12.1

ERP12.1

Page 28: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

28 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Improved Agility With Changing WorkloadsExpand Cluster to Support Flexible Consolidation Model

Services

Single SGA perCDB Instance

Node1

CDB Instance 1

Node2

CDB Instance 2

Multitenant Container Database (CDB)

CRMBI HCM ERPDW

Page 29: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

29 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Improved Agility With Changing WorkloadsExpand Cluster to Support Flexible Consolidation Model

Services

Single SGA perCDB Instance

Node1

CDB Instance 1

Node2

CDB Instance 2

Node3

CDB Instance 3

Multitenant Container Database (CDB)

CRMBI HCM ERPDW

Page 30: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

30 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Multitenant for Provisioning

PDBs can be cloned from remote CDBs

PDBs can be cloned from within the same CDB

Fast cloning of PDBs

Page 31: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

31 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Cloning a PDBExample

create pluggable database HCMBI from HCM

create pluggable database HCMBI from [email protected]

Remote (DB Link)

Local

Page 32: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

32 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Per PDB vs per CDBCommon operations on CDB with granular control where appropriate

Single Oracle Software Version

Data Guard

Scheduled RMAN Backups

Some parameters/propertiese.g. homogeneous character set

Redo and Undo

RMAN point-in-time recovery

Ad hoc RMAN backups

Flush shared pool

Parameters where

IsPDB_Modifiable = 'TRUE'

Per CDB Per PDB

Page 33: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

33 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Advantages of Multitenant ArchitectureReduced CapEx & OpEx, Increased Agility, Easy Adoption

Container Database

Self-contained PDB for each application Applications run unchanged Rapid provisioning (via clones) Portability (via pluggability)

Shared memory and background processes More applications per server

Common operations performed at CDB level Manage many as one (upgrade, HA, backup) Granular control when appropriate

Page 34: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

34 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Agenda

Rethinking Architecture for the Database Cloud Multitenant Architecture Capabilities Enabled Managing Shared Resources Upgrading to Multitenant

Page 35: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

35 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Managing Shared ResourcesResource management in multitenant environment

Multitenant Container DatabaseHigh Priority

Medium Priority

Low Priority

DW

CRM

ERP

Page 36: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

36 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Managing Resources between PDBs

Resource Manager can manage resources on two basic levels:– CDB level

How resources are allocate d to PDBs Limit the resources utilization of specific PDBs

– PDB level Resource Manager can manage the workloads within each PDB

Page 37: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

37 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Managing Resources between PDBs

Using Resource Manager, you can control– CPU– Parallel execution servers– Exadata I/O– Sessions

Configure a policy that controls how resources are utilized– Default configuration that works, even as PDBs are added or removed

You can change default configuration

Page 38: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

38 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Manage CPU

Pluggable Database Shares Guaranteed CPU Maximum CPU

HCM 2 2/4 = 50% 100%

CRM 1 1/4 = 25% 100%

ERP 1 1/4 = 25% 100%

2 Shares 1 Share 1 Share

A CDB Resource Plan uses shares to specify how CPU is distributed between PDBs

Page 39: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

39 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Agenda

Rethinking Architecture for the Database Cloud Multitenant Architecture Capabilities Enabled Managing Shared Resources Upgrading to Multitenant

Page 40: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

40 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Upgrading to MultitenantStep 1: Upgrade databases in-place

10.2

ERP

11.1

CRM

11.2

DW

12.1

ERP

12.1

CRM

12.1

DW

Container Database

Upgrade in PlaceContainer Database

Page 41: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

41 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Upgrading to MultitenantStep 2: Plug-in upgraded databases

Container Database

12.1

ERP

12.1

CRM

12.1

DW

Page 42: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

42 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Upgrading to Multitenant

No application changes required.

Step 3. Change applications to work with Multitenant

Page 43: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

43 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Migrate using Replication

① Provision new PDB from Seed② Replicate using technologies such as

Oracle GoldenGate or Data Pump

New in 12.1, you ask that full database export and full database import make maximum use of transportable tablespaces in the single expdb and impdb commands.

(Backported to 11.2.0.3.)

Page 44: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

44 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Benefit Capability Enabled

Minimize CapEx • More applications per server

Minimize OpEx• Manage many as one• Standardized procedures & service levels• Rapid provisioning

Maximize Agility• Cloning for development / testing• Portability through “pluggability” • Scalability with RAC

Ease of Adoption • Applications run unchanged

Key Benefits

Page 45: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

45 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Agenda

Rethinking Architecture for the Database Cloud Multitenant Architecture Capabilities Enabled Managing Shared Resources Upgrading to Multitenant

Page 46: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

46 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Q&AYour questions

Page 47: Oracle Multitenant - organized by  Orient ITM - 12 Jul 2014

47 Oracle Multitenant - Mahir M. Quluzade © 2014 http://www.mahir-quluzade.com

Thank you!

Mahir M. Quluzadehttp://www.mahir-quluzade.com

ORIENT ITM!