exadata snapshot databases - doag deutsche oracle exadata test environments cloning exadata dbs...

Download Exadata Snapshot Databases - DOAG Deutsche ORACLE Exadata Test Environments Cloning Exadata DBs either

Post on 12-Mar-2020

6 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Exadata Snapshot Databases

    Peter Brink DOAG 2018 November 2018

  • Agenda

    §  Database Virtualization §  Exadata Test Environments §  Exadata Snapshot Databases (12.1) §  Exadata Snapshot Databases (12.2) §  Sparse Clones in the Cloud §  Snaphot Performance §  Discussion §  Appendix §  Pre-Requisites §  Creating and Managing Snapshot

    Databases (12.1)

    DOAG 2018, Nuremberg, November 2018 Peter Brink 2

  • Database Virtualization Database copies are needed to support business and efficient development but are hard to sustain using traditional database cloning methods

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    Providing an adequate number of database copies increases productivity, shortens time to market and

    improves product quality.

    Multiple DB copies Challenges with traditional database refreshes

    þ  INCREASED PRODUCTIVITY •  Avoid sharing between project streams •  DB's for business to test

    þ  INCREASED QUALITY •  Databases for unit test, CI, QA, UAT etc •  Reproduce production behaviour

    þ  REDUCED COST •  Faster time to market •  Fewer bugs, less support

    q  DECREASED PRODUCTIVITY •  Time and effort for database refreshes

    q  DECREASED QUALITY •  Sharing of DB's will impact users •  Data subsetting reduces quality

    q  INCREASED COST •  High storage cost •  Higher development, support cost •  Opportunity cost

    P ro

    du ct

    iv ity

    Q

    ua lit

    y P

    ro fit

    UAT CCI EII FRS Dev

    3

  • Database Virtualization Technologies offering thin provisioning with a copy-on-write paradigm provide a fast, cost-efficient method for database cloning, increasing productivity

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    §  Most data in test environments is identical, no need for multiple copies

    §  Only data that is unique to a test database gets written

    §  Fast provisioning §  Enables self-service §  Multiple different hard- and

    software options, e.g. NetApp, ZFS-SA, Delphix, EMC, CloneDB

    Clone Master

    Block 1

    Block 3

    Block 2

    Clone DB 1

    Block 1 CM

    Block 1 updated on Clone Master

    Block 3 C1

    Block 3 updated on Clone 1

    Block 4 C1

    Block 4 written on Clone 1

    Clone DB 2

    Solution: Thin Provisioning

    4

  • Test databases don’t change a lot Production data changes slowly

    Database Virtualization Through sharing of read-only data between databases virtualization technologies enable fast, space efficient cloning.

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    Production data changes slowly

    5

    Test databases don’t change a lot

    Daily block changes (%) Date App MA App TS App MY 11-05-2017 0.9 3.5 2.7

    12-05-2017 1.8 4.0 3.7

    13-05-2017 1.7 1.4 3.2

    14-05-2017 0.7 - -

    15-05-2017 0.8 1.0 0.4

    16-05-2017 2.2 1.7 3.0

    17-05-2017 2.3 4.3 3.5

    18-05-2017 2..2 1.1 3.5

    19-05-2017 2.3 1.6 3.6

    20-05-2017 1.8 0.7 3.1

    21-05-2017 0.5 - -

    22-05-2017 1.5 0.9 0.4

    23-05-2017 3.2 3.3 3.0

    Average 1.7 2.1 2.4

    Application Size of Prod (TB)

    Number of Clones

    Avg % Clone Change

    App MA 43 91 1.3

    App TS 4 64 6.7

    App MY 44 17 0.9

  • Exadata Test Environments Cloning Exadata DBs either sacrificed Exadata features by running clones on another platform or used a non-thin provisioning method on Exadata §  Non-virtualized databases on Exadata result in

    §  Limited number of environments §  Sharing of test databases and data

    subsetting §  Time and effort to refresh §  Increased storage demand

    §  Use virtualization technologies, e.g. ZFS-SA §  Differentiating features of Exadata like

    Storage Offloading and HCC are not available

    §  Test environment users suffer from poor performance

    §  Not suited for performance testing §  Difficult to develop and test against

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    12.1.0.2: fast space-efficient Snapshot database on Exadata

    Exadata

    ZFS-SA

    Production DR Standby

    Clone Master

    Clone DB 1

    Clone DB 2

    Clone DB 4

    Clone DB 3

    6

  • 12.1 Exadata Snapshot Databases New Snaphot Databases give all the advantages of thin-provisioning and retaining performance of the Exadata platform

    §  Thin provisioning of test and development snapshot databases

    §  Snaphot databases can use all Storage Server Software features

    §  Snaphots are created from a read- only database

    §  Multiple snapshot databases hanging off the same clone master can share space

    §  Integration with multi-tenant option provides simple workflow to create PDB snapshot databases. Snapshots can be created for individual PDB’s or a CDB / non- container database

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    Exadata

    Production DR Standby

    Read-only Clone Master

    Clone DB 1

    Clone DB 2

    Clone DB 4

    Clone DB 3

    Dataguard / RMAN

    Dataguard

    7

  • ASM Sparse Disk Groups New Sparse Disk Group are key invention enabling thin-provisioned Exadata clones

    DOAG 2018, Nuremberg, November 2018 Peter Brink 8

    Exadata

    Production DR Standby

    Read-only Clone Master

    Clone DB 1

    Clone DB 2

    Clone DB 4

    Clone DB 3

    Sparse Disk Group

    §  Sparse files used to store changed / new blocks from Snapshot databases.

    §  Pointer to parent file gives access to unchanged blocks. Sparse data files can only be created in sparse disk groups

    §  Sparse grid disks have a physical and virtual size with limits of 4TB and 100TB respectively

    §  Sparse disk groups can contain sparse and non-sparse files

    §  Control files, temp files and redo logs are not sparse

  • Lifecycle of 12.1 Snapshot databases Lifespan of a snapshot database is limited by the lifetime of the Clone Master. Refreshes with the latest data will wipe out the Clone Master and clones

    1.  Prepare clone master Reconfigure DataGuard standby / RMAN backup/restore

    2.  Run any pre-clone script on clone master, e.g. data masking 3.  Create clones 4.  Refresh clone master

    drop all snapshot database sync clone master

    Different refresh requirements likely to require to have multiple Clone Masters with different refresh cycle. DOAG 2018, Nuremberg, November 2018 Peter Brink

    Exadata

    Production / DR

    Standby

    Exadata

    Read-only Clone Master

    Clone DB 2

    Clone DB 4

    Clone DB 3

    Clone DB 1

    Clone DB 5

    1) 2)

    3) refresh

    9

  • Exadata

    12.2 Hierarchical Snapshot Databases Hierarchical snapshots allow to create a clone from a clone, thus giving more flexibility for testing and maintaining all snapshots from a single Standby

    Convert to R/O Test Master to create child clones

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    Exadata

    Production / DR

    Standby

    Test Master (RO)

    Clone DB 2

    Clone DB 3

    Clone DB 1

    10

    Prj V1

    Prj V2 Prj V2.2

  • RO TM 2 (sparse DG)

    12.2 – Data Guard Standby as Test Master Using a Data Guard physical standby as test master database makes refreshes easy.

    DOAG 2018, Nuremberg, November 2018 Peter Brink

    Production / DR

    Standby

    Test Master

    11

    R/W Test Master

    (sparse DG)

    Data Guard

    RO TM 1 (full, original data files)

    Peter’s Clone

    David’s Clone

    Marcin’s Clone

    Marcin’s Clone 2

    Data Guard

    Marcin’s Clone (RO)

    RO TM 42 (sparse DG)

    R/W Test Master

    (sparse DG)

    Data Guard

    ...

    Steve’s Clone

    Adam’s Clone (RO)

    Adam’s Clone 2

    Adam’s Clone 3

  • 12.2 – Data Guard Standby as Test Master Implications of hierarchical structure might prevent you from configuring a DG Standby as Test Master

    DOAG 2018, Nuremberg, November 2018 Peter Brink 12

    §  It is not possible to delete individual test masters

    §  Performance degrades when accessing data blocks up the hierarchy – Clones hanging off the oldest test masters perform best

    Original data Clone Data Original 5.38 -

    TM4 7.01 5.51

    TM8 10.35 5.55

    TM11 11.92

  • Sparse Clones in the Cloud

    Prerequisites •  Create Sparse Disk Group when setting up Exadata Cloud Service

    instance (check “Create sparse disk group”) •  Databases must be 12c or higher

    DOAG 2018, Nuremberg, November 2018 Peter Brink 13

  • Exadata Cloud Service– Create Snapshot Master

    DOAG 2018, Nuremberg, November 2018 Peter Brink 14

Recommended

View more >