23
Delivering Oracle Success New Cloning Features Available in Oracle 11g R2 John Darrah RMOUG Training Days February 2012

RMOUG Training Days February 2012 - DBAKdbak.com/.../uploads/2012/02/...Darrah_Cloning-Technologies-Oracle … · RMOUG Training Days February 2012 ©DBAK 22012 About DBAK Oracle

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Delivering Oracle Success

New Cloning Features Available in Oracle 11g R2

John Darrah

RMOUG Training DaysFebruary 2012

© DBAK 2012 2

About DBAKOracle Solution Provider and License ResellerCore Technology and EBS ApplicationsColorado Owned and OperatedAverage 15 Years of Oracle Expertise “Top 250 Private Companies, 2011” – CoBIZ Magazine “Emerging Business of the Year, 2008” – South Metro Denver Chamber of Commerce100+ Clients170+ Implementations, Upgrades, Conversions, Support ProjectsOracle Gold PartnerOEM “Specialized”

© DBAK 2012 3

AgendaTypes of Database ClonesReasons for CloningChallengesCloning enhancements in 11gActive DataGuardSnapshot StandbyClonedbEdition Based Redefinition

© DBAK 2012 4

Types of Database ClonesFull Copy Clone• The source database is copied• The copy is restored to a new environment• The copied database is opened for use• RMAN Duplicate is an example of a Full Copy Clone

Delta Clone• A baseline of the database is created• The baseline and special files containing deltas are used

together to display database content Code Only Clone• Only VIEWS, TRIGGERS, and PL/SQL Objects are cloned

© DBAK 2012 5

Reasons for cloningReporting environments• Many reporting tools require read / write access to the

databaseDevelopment Environments• Developers want and sometimes require fresh data for

effective unit testing

QA environments• Effective integration and performance testing require recent

copies of production data

Environment Management• Test build scripts against production data

© DBAK 2012 6

Challenges with environment cloningCloning can be time consuming and expensive• Large databases take a long

time to duplicate• Enterprise Disk is expensive

– Enterprise Class Storage != Best Buy Hard drive

– Justifying the disk budget for a full development copy can be difficult.

© DBAK 2012 7

Challenges with environment cloningDifferent teams have different development requirements• Development, QA, Reporting, and Environment

Management all have different needs requiring environments.

– If multiple development projects run concurrently there is a need for even more environments

Development Requirements …

QA Requirements …

Reporting Requirements …

Environment Management Requirements …

© DBAK 2012 8

Cloning enhancements available in 11gThree new ways to create a clone environment in 11g• Full Copy Clone

– Active Data Guard– Snapshot Standby

• Delta Clone– Direct NFS and clonedb

• Code Only Clone– Edition Based Redefinition

© DBAK 2012 9

Active Data Guard, What it isA physical Standby database that can be Queried while being recovered• Read only• Requires an additional license (Active Data

Guard)• Great for report offload

Active Data Guard has other benefits• Automatic Block Repair• Fast Incremental Backups

Best used for leveraging existing DR instances• ODS• Reporting Environment• Backup Offload

© DBAK 2012 10

Active Data Guard, How it worksExtends Oracle’s standard CR technology

• No ‘dirty reads’ for queries on the standby• Repeatable Reads available• Data Dictionary Caches are kept up to date• In short ACID properties not compromised• Query guaranteed to return the same result it would have returned on the

primary at a given SCN

© DBAK 2011 10

© DBAK 2012 11

Active Data Guard Use CasesActive Data Guard is good choice for• Reporting databases• Read only applications• Leveraging existing DR investment without comprising

RTO / RPO SLAsActive Data Guard is not a good choice for• Reporting Environments that require writes• Development Environments (obviously)• Reporting Environments that need a static data set

© DBAK 2011 11

© DBAK 2012 12

Snapshot Standby What it isA set of commands to change a physical standby database into a read write database and back again• Does not require additional licenses beyond EE for

standby environment• Database is read write• Recovery is stopped while database is open• Technology to create Flashback standby is available in

10g– 11g automates the process via DGMGRL or OEM

© DBAK 2011 12

© DBAK 2012 13

Snapshot Standby, How it WorksLeverages Flashback database• Guaranteed Restore Point created• Database Opened Read Write• Archive Logs continue to ship but are not applied• To re-instantiate standby:

– Flashback to restore point– ALTER DATABASE CONVERT TO PHYSICAL

STANDBY;– Resume Archive Log application

• Snapshot Standby databases can be refreshed from incremental backups as well as Archive Logs

© DBAK 2011 13

© DBAK 2012 14

Snapshot Standby Use CasesSnapshot Standby is good for:• Reporting environments that require DML/DDL access

– Discoverer– Micro Strategies

• Reporting environments that need a consistent and static data set

– All reports assume data as of midnight Snapshot standby should not be used if:• Opening the database jeopardizes the RTO SLA for the

environment– Flashback can take a long time– Log application can take a long time

© DBAK 2011 14

© DBAK 2012 15

DNFS Clonedb; what it is A sparsely documented new feature available as of 11.2.0.2• Requires Oracle Direct NFS• Uses a Datafile copy for its base data set• Creates separate delta datafiles to hold block changes• Uses Copy on Write (COW) to write changes to the

delta files instead of the base backup files• Metalink Note: 1210656.1 is the only Oracle

documentation I have found on this feature

© DBAK 2011 15

© DBAK 2012 16

Clonedb; How it worksClonedb leverages Oracle Direct NFS• Datafile copies are placed on disk accessible to the

server where the clone will be created (local,SAN,NFS,DNFS)

• A mount that supports Direct NFS is used to hold changes to blocks

• Changes are stored in sparse files. Bitmaps in the files show what blocks live where

• Oracle uses Copy on Write to write changes to the delta files instead of the base

• Oracle silently merges the base with the changes in the delta files during queries.

© DBAK 2011 16

© DBAK 2012 17

Clonedb; usesClonedb is good for:• Providing one or more non production environments

from a single set of backup datafiles• Creating an environment to test build scripts for

releases• Leveraging existing backups for non produciton

environmentsClonedb is not ideal for:• Performance testing*• Environments that do not use NAS storage

© DBAK 2011 17

© DBAK 2012 18

Edition Based Redifinion; what it isAn 11g feature that allows several versions of the same code to exist in the same schema• A new level of granularity:

– Schema» Object Name

– Edition• Stored code can have several versions

– Ora$base» R2

– R3

© DBAK 2011 18

© DBAK 2012 19

Edition Based Redefinition; how it worksEBR gives a new level of granularity for certain objects• Views, Stored PL/SQL objects, Types, and Synonyms

are all editionable• Tables and Materialized Views are not• Two new objects are used with EBR

– Editioning Views– Cross Edition Triggers

• Editioning Views and Cross Edition Triggers compensate for object types that are not editionable

© DBAK 2011 19

© DBAK 2012 20

Edition Based Redefinition; Use CasesEBR is good for:• Hot Code Upgrades in production• Providing a quick fallback to prior code base• Multiple development environments using the same

data but different versions of editionable objects• Beta version of code in production

EBR is not:• EBR is not a true clone• The underlying data is shared amongst all editions

© DBAK 2011 20

© DBAK 2012 21

Demos Active Data GuardSnapshot standbyClonedbEdition Based Redefinition

© DBAK 2011 21

© DBAK 2012 22

Questions

© DBAK 2012 23

Contact

John Darrah720.475-8600

[email protected]

Presentation available at:www.dbaknow.com/downloads

www.dbaknow.com