Application Containers an Introduction

Similar documents
Application Containers an Introduction

Application Containers an Introduction

Domain Services Clusters Centralized Management & Storage for an Oracle Cluster Environment Markus Flechtner

Taming the Pluggable Database Resource Management & Lockdown Profiles in Oracle 12.2 Markus Flechtner

Online Operations in Oracle 12.2

Database Sharding with Oracle RDBMS

Oracle Database 18c New Performance Features

DOAG 2013 Oracle 12c Backup & Recovery

Cloud Acceleration. Performance comparison of Cloud vendors. Tobias Deml DOAG2017

Backup Methods from Practice

Data Vault Partitioning Strategies. Dani Schnider, Trivadis AG DOAG Conference, 23 November 2017

Bloom Filters DOAG Webinar, 12 August 2016 Christian Antognini Senior Principal Consultant

The three investigators

Empfehlungen vom BigData Admin

Database Rolling Upgrade with Transient Logical Standby Database DOAG Day High Availability Robert Bialek Principal Consultant

Exploring Oracle Database 12c Multitenant Best Practices for your Cloud Ami Aharonovich

ORACLE 12C PLUGGABLE DATABASE FEATURE INSIGHTS

ORACLE 12C NEW FEATURE. A Resource Guide NOV 1, 2016 TECHGOEASY.COM

Identifying Performance Problems in a Multitenant Environment

Recovery without Backup. All Data Lost?

Analytic Views: Use Cases in Data Warehouse. Dani Schnider, Trivadis AG DOAG Conference, 21 November 2017

Oracle Multitenant What s new in Oracle Database 12c Release ?

Data Replication With Oracle GoldenGate Looking Behind The Scenes Robert Bialek Principal Consultant Partner

Multitenant Databases. Arup Nanda Longtime Oracle DBA

Query Optimizer MySQL vs. PostgreSQL

Query Optimizer MySQL vs. PostgreSQL

Exploring Oracle Database 12c Multitenant Best Practices for your Cloud

Oracle Database Server 12c Pros and Cons

SE2 goes Enterprise. Hidden Treasures in Oracle Dr. Thomas Petrik DOAG Konferenz, November 2017, Nürnberg

WELCOME. Unterstützung von Tuning- Maßnahmen mit Hilfe von Capacity Management. DOAG SIG Database

Oracle In-Memory & Data Warehouse: The Perfect Combination?

Oracle Database Service High Availability with Data Guard?

Consolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option

Course: Oracle Database 12c R2: Administration Workshop Ed 3

Die Wundertüte DBMS_STATS: Überraschungen in der Praxis

Oracle Database 12c for SAP

Migrating to 12c: 300 DBs in 300 days.

Pitfalls & Surprises with DBMS_STATS: How to Solve Them

How Autonomous is the Oracle Autonomous Data Warehouse?

Oracle Database 12c Multitenant Administration Scenarios Presented to UPNYOUG June 10, 2016 Kevin Gilpin, Advizex

DumpsKing. Latest exam dumps & reliable dumps VCE & valid certification king

12.1 Multitenancy in real life

Designing for Performance: Database Related Worst Practices ITOUG Tech Day, 11 November 2016, Milano (I) Christian Antognini

Blink and You ll Miss It: Migrating, Cloning and Recovering Oracle 12c Databases At Warp Speed

Oracle Database 12c R2: Administration Workshop Ed 3 NEW

Edition-Based Redefinition

Adaptive

MythBusters Globalization Support

Oracle Database 12c R2: Administration Workshop Ed 3

Get Groovy with ODI Trivadis

REALTIME WEB APPLICATIONS WITH ORACLE APEX

Behind the scenes of Oracle MulCtenant

Oracle Database 12c: New Features For Administrators

Oracle Database 12c R2: RAC Administration Ed 2

Oracle Database 12c: New Features for Administrators (40 hrs.) Prerequisites: Oracle Database 11g: Administration Workshop l

1z0-063.exam. Number: 1z0-063 Passing Score: 800 Time Limit: 120 min File Version: 3.0. Oracle. 1z Oracle Database 12c: Advanced Administration

Oracle Database New Performance Features

Flashback Database, Backup and Recovery in. Oracle Database 12c Release 2

Oracle Database 12c: RAC Administration Ed 1

Oracle Database 12c R2: Managing Multitenant Architecture Ed 2

TestsDumps. Latest Test Dumps for IT Exam Certification

Oracle Database 12c. Boeblingen Bootcamp February 2014 SIG Washington DC April 2014

Oracle12c Release 1 New Features for Administrators (5 Days)

An Oracle White Paper October Deploying and Developing Oracle Application Express with Oracle Database 12c

Feature of our Oracle Databases - Why should we migrate to Multitenant architecture

RACifying Multitenant

ORACLE DBA I. Exploring Oracle Database Architecture

Oracle DBA Course Content

"Charting the Course... Oracle 18c DBA I (3 Day) Course Summary

Oracle Database 12c Anger Management for DBAs. Hans Forbrich Forbrich Consulting Ltd.

Oracle - Oracle Database 12c R2: Administration Workshop Ed 3

Oracle Database Failover Cluster with Grid Infrastructure 11g Release 2

PDBs in der Praxis Experiences Using PDBs. Ernst Leber Nürnberg 15. November 2016

Databases Clone using ACFS. Infrastructure at your Service.

Agenda. Oracle 12.2 New features Multi-Tenancy. Naming Standard. Naming Standard cont. Create Pluggable Database / Cloning.

1Z Upgrade to Oracle Database 12cm Exam Summary Syllabus Questions

RMOUG Training Days 2018

Microservices with Kafka Ecosystem. Guido Schmutz

Oracle Database 12c: RAC Administration Ed 1 LVC

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Database 12c R2: New Features for Administrators Part 1 Ed 1

Oracle. Exam Questions 1Z Oracle Database 11g: New Features for 9i OCPs. Version:Demo

Oracle Database 12c: New Features for Administrators Duration: 5 Days

news Oracle 12c A Multitude of new Features for an Optimised Database Platform ... the smarter way of information

Explore the Oracle 10g database architecture. Install software with the Oracle Universal Installer (OUI)

Incrementally Updating Backups Tips and Tricks

What s New with Oracle Data Pump in Oracle Database 12c. Dean Gagne Consulting Member of Technical Staff

SQL Server 2014 Highlights der wichtigsten Neuerungen In-Memory OLTP (Hekaton)

Oracle Audit in a Nutshell - Database Audit but how?

Exam Questions 1Z0-062

Oracle Database 12c R1: New Features for Administrators Ed 2

Oracle12c Release 1 & 2 New Features for Administrators (5 Days)

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database 12c: Advanced Administration. Question Question 60

Safe Harbor Statement

Oracle 1Z0-497 Exam Questions and Answers (PDF) Oracle 1Z0-497 Exam Questions 1Z0-497 BrainDumps

Alain Fuhrer Oracle Database Administrator Swiss Mobiliar Insurance

You'll even like your Data Guard more with Flashback

Exam 1Z0-061 Oracle Database 12c: SQL Fundamentals

Oracle Database 12c R2: New Features for 12c R1 Administrators Ed 1

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Transcription:

Application Containers an Introduction Oracle Database 12c Release 2 - Multitenancy for Applications Markus Flechtner BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH

Our company. Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields: O P E R A T I O N Trivadis Services takes over the interactive operation of your IT systems. 2 28.09.17

With over 600 specialists and IT experts in your region. COPENHAGEN 14 Trivadis branches and more than 600 employees HAMBURG 200 Service Level Agreements Over 4,000 training participants DÜSSELDORF Research and development budget: CHF 5.0 / EUR 4 million FRANKFURT Financially self-supporting and sustainably profitable BRUGG FREIBURG STUTTGART MUNICH VIENNA Experience from more than 1,900 projects per year at over 800 customers BASLE ZURICH GENEVA BERN LAUSANNE 3 28.09.17

About me.. Markus Flechtner Principal Consultant, Trivadis, Duesseldorf/Germany, since April 2008 Discipline Manager Infrastructure Database @Trivadis Working with Oracle since the 1990 s Development (Forms, Reports, PL/SQL) Support Database Administration Focus Oracle Real Application Clusters Database Migration Projects Blog: https://www.markusdba.net/ @markusdba Teacher O-RAC Oracle Real Application Clusters O-NF12CDBA Oracle 12c New Features for the DBA 4 28.09.17

Agenda 1. Container Database Architecture 2. Application Containers Overview 3. Application Common Objects 4. Installing Applications 5. Upgrading and Patching Applications 6. Administration & Daily Business 7. Summary 5 28.09.17

Container Database Architecture 6 28.09.17

Oracle Multitenant in Oracle Database 12c The container database architecture (multitenant architecture) introduced in Oracle Database 12c Release 1 enables an Oracle database to work as a container database (CDB) A new database architecture designed for: consolidation/database virtualization fast and easy provisioning separation of administrative duties rapid movement of user data (unplug/plug) Pluggable databases (PDBs) are compatible with traditional non-cdb (same behaviour from the application point of view) 7 28.09.17

Container Database Architecture - overview PMON SMON LGWR DBW0 DIAG CDB$ROOT [RW] SYSTEM SYSAUX UNDO TEMP REDO CTL PDB$SEED [RO] CRM01 [RW] FA01 [RW] CDB DBA SYSTEM SYSAUX UNDO TEMP SYSTEM SYSAUX UNDO TEMP SYSTEM SYSAUX UNDO TEMP Application Tablespaces Application Tablespaces CRM DBA FA DBA APP DBA 8 28.09.17

Container Database Architecture - Sharing To avoid the duplication of system metadata, a CDB uses a new object property called SHARING SQL> SELECT sharing, count(*) 2 FROM dba_object GROUP BY sharing; SHARING COUNT(*) ------------------ ---------- METADATA LINK 66457 DATA LINK 214 EXTENDED DATA LINK 56 NONE 5053 CDB$ROOT [RW] PDB$SEED [RO] CRM01 [RW] 9 28.09.17

Application Containers Overview 10 28.09.17

Application Containers - Overview Consist of Application Root CDB$ROOT Application Seed Application PDBs PDB$SEED CRM01 Application Root (APPROOT) Applications can share Data model APPSEED DEMOPDB1 DEMOPDB2 Code Metadata Data 11 28.09.17

Application Containers Use Cases Software as a Service (SaaS) Better master data management Coordinated and simplified upgrades manage many as one CDB$ROOT Application Root (FA) Application Root (CRM) FA$SEED FACUST1 Version1 FACUST2 Version3 CRM$SEED CRMCUST1 Version1 CRMCUST2 Version1 CRMCUST3 Version2 CRMCUST4 Version2 12 28.09.17

Application Common Objects 13 28.09.17

Sharing - Application Common Objects Application Common Objects (Sharing-Attribute) Sharing Definition Data METADATA APPROOT APPPDB DATA APPROOT APPROOT Data accessible from Application PDB EXTENDED DATA APPROOT APPROOT APPPDB NONE local local Data is stored in Application Root and can be retrieved from all Application PDBs Additional PDB-level data can be stored in Application PDB CREATE TABLE <table_name> SHARING=METADATA ( col1.. ) 14 28.09.17

Which sharing methods are allowed? Object Type Metadata Link Data Link Extended Data Link None Table YES YES YES YES Views YES YES YES YES Sequences YES YES NO YES All others YES NO NO YES 15 28.09.17

Foreign Keys to Data Linked Tables Application Root (APPROOT) create table DEPT SHARING=DATA (DEPTNO number constraint PK_DEPT primary key, DNAME varchar2(30)); DEPT (DATA) DEMOPDB EMP (DEF) create table EMP SHARING=METADATA (EMPNO number constraint PK_EMP primary key, ENAME varchar2(30) not null, DEPTNO constraint FK_DEPT references DEPT); DEPT (DEF) EMP (DATA) APPROOT SQL> insert into DEPT.. DEMOPDB1 SQL> insert into EMP.. ORA-02291: integrity constraint (SCOTT.FK_DEPTNO) violated - parent key not found Bug 21955394 (Patches are available for 12.2 Base Release and RU 12.2.0.1.170718) 16 28.09.17

Be Careful with DML on Application Container Objects DML from Application PDB on an a Data-Linked Table: SQL> update scott.dept set loc='seattle' where loc='chicago'; update scott.dept set loc='seattle' where loc='chicago' *ERROR at line 1: ORA-65097: DML into a data link table is outside an application action DML from Application PDB on a Extended Data-Linked Table (row from Application Root): SQL> select * from scott.zip_codes where zip_code='40227'; CO ZIP_C CITY -- ----- ---------------------------------------- DE 40227 Duesseldorf SQL> update scott.zip_codes set zip_code='44444' where zip_code='40227'; 0 rows updated. 17 28.09.17

Installing Applications 18 28.09.17

Prepare the Application in the Application Root (1) Create Application Root (similar to CDB$ROOT) Not documented! Oracle Managed Files (OMF) are required when using Application Containers create pluggable database DEMO AS APPLICATION CONTAINER admin user admin identified by manager; Create the application in the Application Root alter pluggable database application DEMOAPP begin install '1.0';.. create tablespaces (OMF).. create users.. create application objects alter pluggable database application DEMOAPP end install '1.0'; During application creation the statements are recorded 19 28.09.17

Prepare the Application in the Application Root (2) Create Application Common Objects SQL> Alter session set container=demo; SQL> alter pluggable database application DEMOAPP begin install '1.0'; SQL> show user USER is "SYS" SQL> create table SCOTT.EMP SHARING=METADATA [..] Table created. Works! alter pluggable database application DEMOAPP end install '1.0'; 20 28.09.17

Prepare the Application in the Application Root (3) Create Application Common Objects (as object owner) SQL> Alter session set container=demo; SQL> alter pluggable database application DEMOAPP begin install '1.0'; SQL> create user scott.. SQL> connect scott/tiger@demo SQL> create table EMP SHARING=METADATA [..] ORA-65021 illegal use of SHARING -clause 21 28.09.17

Prepare the Application in the Application Root (4) Create Application Common Objects (as object owner) Not documented! SQL> alter pluggable database application DEMOAPP begin install '1.0'; SQL> exec dbms_application_info.set_module('install_v1',null); SQL> create user scott.. SQL> connect scott/tiger@demo SQL> exec dbms_application_info.set_module('install_v1',null); SQL> create table EMP SHARING=METADATA [..] Table created. SQL> connect sys/manager@demo as sysdba SQL> exec dbms_application_info.set_module('install_v1',null); SQL> alter pluggable database application DEMOAPP end install '1.0'; 22 28.09.17

Create an Application PDB Two ways to create an Application PDB Via an Application Seed Directly from Application Root During the PDB creation the statements are replayed 23 28.09.17

Application Seed Similar to PDB$SEED Optional Only one Application seed per Application container allowed SQL> CREATE PLUGGABLE DATABASE AS SEED 2 ADMIN USER app_admin IDENTIFIED BY manager; Pluggable database created. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 DEMO READ WRITE NO 4 DEMO$SEED MOUNTED 24 28.09.17

Create an Application PDB (1) from Application Seed Step 1: Install Application in Application Seed ALTER PLUGGABLE DATABASE DEMO$SEED OPEN; ALTER SESSION SET CONTAINER=DEMO$SEED; ALTER PLUGGABLE DATABASE APPLICATION DEMO SYNC; ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE; ALTER PLUGGABLE DATABASE OPEN READ ONLY; Clone the Application Seed create pluggable database DEMOPDB1 from DEMO$SEED; alter pluggable database DEMOPDB1 open; 25 28.09.17

Create an Application PDB (2) from Application Root ALTER SESSION SET CONTAINER=DEMO; create pluggable database DEMOPDB1 admin user admin identified by admin; Alter pluggable database DEMOPDB1 open; ALTER SESSION SET CONTAINER=DEMOPDB1; Alter pluggable database application DEMOAPP sync;.. after that the application can be used in DEMOPDB1 26 28.09.17

Patching and Upgrading Applications 27 28.09.17

Application Containers Upgrade an Application (1) Upgrade the application in the Application Root alter pluggable database application DEMOAPP begin upgrade from '1.0' to '2.0';.. modify application objects alter pluggable database application DEMOAPP end upgrade to '2.0'; Upgrade in Application PDB Alter pluggable database application DEMOAPP sync; 28 28.09.17

Application Containers Upgrade an Application (2) During an upgrade, a read-only clone of the source Application Root is created From the alert.log: DEMO(5):alter pluggable database application DEMOAPP begin upgrade '1.0' to '2.0' CREATE PLUGGABLE DATABASE "F613214177_3_1" AS APPLICATION CONTAINER from "DEMO" CREATE_FILE_DEST='/u01/oradata' [..] Completed: CREATE PLUGGABLE DATABASE "F613214177_3_1" AS APPLICATION CONTAINER from "DEMO" CREATE_FILE_DEST='/u01/oradata'[..] ALTER PLUGGABLE DATABASE "F613214177_3_1" OPEN READ ONLY INSTANCES=ALL [..] Completed: ALTER PLUGGABLE DATABASE "F613214177_3_1" OPEN READ ONLY INSTANCES=ALL Purpose: Application Root for Application PDBs not upgraded to the new release 29 28.09.17

Patching an Application alter pluggable database application DEMOAPP begin patch <Patch#>;.. modify application objects alter pluggable database application DEMOAPP end patch <Patch#>; Limited set of operations (e.g. no DROP TABLE) A minimum start version can be defined 30 28.09.17

Administration & Daily Business 31 28.09.17

Administration All administrative tasks are executed from the application root Application Root (APPROOT) CREATE/OPEN/CLOSE/DROP work as with normal PDBs APPSEED DEMOPDB1 DEMOPDB2 Application Root can only be dropped if there are no Application PDBs A normal PDB can be converted to an Application Container (Script: pdb_to_apppdb.sql) 32 28.09.17

Backup & Recovery When connected to CDB$ROOT Same as with usual PDBs When connected to Application Root RMAN> CONNECT TARGET sys/manager@oracle12c:1521/demoapp RMAN> BACKUP DATABASE ROOT; # backup application root RMAN> BACKUP PLUGGABLE DATABASE DEMOPDB1; # backup application PDB RMAN> BACKUP DATABASE; # backup application root + PDBs For recovery the same principles apply 33 28.09.17

Execution Plans (1) Data Linked Table select e.empno, e.ename, d.deptno, d.dname 2 from scott.emp e -- local in application PDB 3 scott.dept d -- from application root (data linked) 4 where d.deptno=e.deptno; --------------------------------------------------------------- Id Operation Name Rows Bytes Cost (%CPU) --------------------------------------------------------------- 0 SELECT STATEMENT 1 35 3 (0) * 1 HASH JOIN 1 35 3 (0) 2 DATA LINK FULL DEPT 1 22 3 TABLE ACCESS FULL EMP 14 182 3 (0) --------------------------------------------------------------- 34 28.09.17

Execution Plans (2) Extended Data Linked Table select * from scott.zip_codes; --------------------------------------------------------------------------------------------- Id Operation Name Pstart Pstop TQ IN-OUT PQ Distrib -------------------------------------------------------------------------------------------- 0 SELECT STATEMENT 1 PX COORDINATOR 2 PX SEND QC (RANDOM) :TQ10000 Q1,00 P->S QC(RAND) 3 PX PARTITION LIST ALL 1 2 Q1,00 PCWC 4 EXTENDED DATA LINK FULL ZIP_CODES Q1,00 PCWP --------------------------------------------------------------------------------------------- 35 28.09.17

Data Dictionary Views (CDB_APP%) CDB_APPLICATIONS CDB_APPLICATION_ROLES CDB_APP_ERRORS CDB_APP_PATCHES CDB_APP_PDB_STATUS CDB_APP_STATEMENTS CDB_APP_VERSIONS 36 28.09.17

Summary 37 28.09.17

Application Containers - Summary + Interesting concept for SaaS + Easy upgrade and patching of lots of Application PDBs - It s a release 1.0 of a very new feature - Some flaws - Oracle Managed Files (OMF) are required - Documentation is misleading in some places 38 28.09.17

Further Information Oracle 12.2 Concepts (Chapter 19) Oracle 12.2 Administrators Guide (Chapter 40 and 44) 39 28.09.17

Questions and Answers Markus Flechtner Principal Consultant Phone +49 211 5866 64725 Markus.Flechtner@Trivadis.com @markusdba https://www.markusdba.net Please don t forget the session evaluation Thank you! 40 28.09.17