oracle recovery manager · rman for cloud migrations rman cross platform transportable pdb 23 •...

Post on 24-Mar-2020

24 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

OracleRecoveryManagerLatest-GenerationFeaturesforOn-PremisesandtheCloud[TRN4219]

MarcoCalmasini,Sr.PrincipalProductManager,OracleFinn Jorgensen,DatabaseAdministrator,Exelon

Copyright©2018 Oracleand/oritsaffiliates.Allrightsreserved.|

SafeHarborStatementThefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.

3

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

ProgramAgenda

OracleBackupandRecoverysolutionsoverview

TransparentDataEncryption– BackupImplications

LeveragingBackupforCloudMigrations

ZDLRAandRMAN– ExelonExperience

1

2

3

4

4

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

ProgramAgenda

OracleBackupandRecoverysolutionsoverview

TransparentDataEncryption– BackupImplications

LeveragingBackupforCloudMigrations

ZDLRAandRMAN– ExelonExperience

1

2

3

4

5

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.

BackupandRecoverySolutionPortfolio

6

OracleCloud

ProtectedFiles

ExaCS

DBCS

Instantiateinto

DBCS/ExaCS

DBBackupCloudService

SecureBackup

On-Premises

Oracle Cloud Storage

Compression&Encryption

BackuptoandRecoverfromOn-PremisesorOracleCloudProtectedDatabases

Cloud@Customer

Filesystem

RMAN: Built-in backup & recovery engine for the Oracle database which provides performant, efficient and dependable protection.

Recovery Appliance: Engineered System purpose-built for data center-wide Oracle database protection which ensures zero data loss, verifies backup integrity, and reduces data protection overhead by eliminating repeated full backups.

DB Backup Cloud Service: Secure & scalable Oracle Cloud Service providing cost effective storage for long-term retention & compliance of RMAN backups.

Secure Backup: Centralized disk, tape and cloud backup management which provides heterogeneous filesystem protection for the entire data center.

1

1

2

23

3

4

4

ArchiveStorage*

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.

RecoveryManagerHistory

7

Oracle8,Oracle8i,Oracle9i

Circa1997-2002

Oracle10g,Oracle11g

Circa2003-2012

Oracle12c2013-2016

Oracle18c2017-2018

••ParallelBackups••DUPLICATE••BlockMediaRecovery••AutomaticControlFile&SPFILEBackup

••CONFIGUREPersistentSettings

••BACKUPBACKUPSET••Andmore…

••FastRecoveryArea••FastIncrementalBackups

••IncrementallyUpdatedBackups

••SWITCHTOCOPY••OffloadBackupstoStandbyDatabase

••Andmore…

••TableLevelRecovery••Cross-PlatformBackup&Recoveryenhancements

••FastActiveDUPLICATE••FastStandbyDatabaseSynchronization

••MultitenantDatabaseBackup&Recovery

••RESTOREASENCRYPTED

••Multi-tenantDBbackuphistorypreservation

••Active cross-CDBPDBduplication

••Active DataGuardSync

••Tiering toOracleCloudArchiveObjectStoragesupport

••DUPLICATEASENCRYPTED

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

OracleDatabase19cRMANnewfeaturesI

• ConnecttoPDBastargetwithRecoveryCatalogsupport–MorecontrolforPDBDBAstomanagetheirbackups– Theconnectiontotherecoverycatalogiscreatedusingtherecoverycatalogowner,rco.Thenetservicenamefortherecoverycatalogdatabaseiscatdb

ConnecttoPDBsastargetandRecoveryCatalogsupport

8

RMAN>connecttarget"sys@salespdb assysbackup"targetdatabasePassword:connectedtotargetdatabase:DBMAIN:SALESPDB(DBID=1661283172)

RMAN>connectcatalogrco@catdbrecoverycatalogdatabasePassword:connectedtorecoverycatalogdatabase

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

OracleDatabase19cRMANnewfeaturesII

• AutomaticproactivedeletionofunnecessaryFlashbacklogs– Before19cFlashbacklogsweredeletedonlyunderFRAspacepressure–Whentheretentiontargetisreduced,flashbacklogsthatarebeyondtheretentionperiodaredeletedimmediatelyfromtheFRA

– SimplifiesthemanagementforFRA– LoadspikesthatgenerateunusualamountlogswillhavelessimpactonFRAspaceconsumptionastheywillbedeleteimmediatelywhenretentionexpires.

SimplifiedFRAspacemanagement

9

Note:flashbacklogscannotbebackedupusingtheRMANcommandBACKUPRECOVERYAREA

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

ProgramAgenda

OracleBackupandRecoverysolutionsoverview

TransparentDataEncryption– BackupImplications

LeveragingBackupforCloudMigrations

ZDLRAandRMAN– ExelonExperience

1

2

3

4

10

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.

• UptrendinadoptionduetoregulationsandCloud

• TDEimproveswitheveryversion– Columnencryptionintroducedin10.2– Tablespaceencryptionaddedin11.1–Offlinetablespaceencryptionaddedin12.2andbackportedto12.1&11.2

–OnlinetablespaceencryptionandRESTOREASENCRYPTEDaddedin12.2

11

TransparentDataEncryption(TDE)

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

OracleDataBlockFormat&RMANBackupsMoreThanSimpleBits….

• OracleDatabasemanagesitslogicalstorageindatablocks–MinimumunitofI/O

• Awelldefinedstructure– Blockheaders,rows,metadataetc.

• RMANBackups– Datafile blocksarelogicallygroupedintobackuppieces

–Orderingofblockswithinabackuppiecedifferentthanwithinthedatafile

CommonandVariableHeaderTableDirectoryRowDirectory

FreeSpace

RowData

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

TDETablespace Encryption

• MasterKeyscanbestoredinlocalfilewalletoronanexternalKeyManagerlikeOracleKeyVault

• WalletsarenotbackedupbyRMANandmustbecarefullyprotected• InPurposeBuiltBackupAppliances,likeZDLRA,deduplicationandcompressionaretwoseparateprocesses

• TDEEncryptionhasabigimpactonyourappliancecompressioncapabilitiesandbackupspaceutilizationmustbecarefullyplanned.

13

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

RMANBackupEncryption

• RMANcanencryptbackupsusingTDEKeys• SameKeyManagementoptionsareavailable,OraclewalletorexternalKeyManager

• Passwordbasedencryptionisalsopossible

• RMANbackupencryptionnegatestarget-sidededuplicationorcompressionsavingsifthetablespaces arenotTDEencrypted

Createsencryptedbackuppiecesofnon-encryptedtablespaces

14

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ONRMAN> CONFIGURE ENCRYPTION ALGORITHM ‘AES256’

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

BackingupTDE-EncryptedTablespaces

• RMANdoesnotre-encryptbackupsifatablespace isalreadyTDE-encrypted

• TheOracleblockheaderisstoredinclearinthebackuppiece

• Deduplication-enabledsolutionscanstillprovidesomebenefits,butloseanytarget-sidesoftwarecompressioncapability

• IfyouturnonTDEtablespace encryptionexpectthebackupspaceconsumptiontotypicallydoubleormoredependingonthebackupcompressionratioachievedpriortousingTDE

WithoutusingRMANcompression

15

BackupPieceHeader

EncryptedBlockData

BlockHeaderinclear

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

BackingupTDE-EncryptedTablespaces

• RMANde-crypts,compressandre-encryptstheOracleblocks

• TheblockheaderisalsoencryptedandtheOracleblockstructurewithinthebackuppieceisnotaccessible

• Deduplication-enabledsolutionsbecomeineffective

• IfyouturnonTDEtablespaceencryptionandRMANcompression,backupscannotbededuplicated orcompressedatthetargetbackupdevice

UsingRMANcompression

16

BackupPieceHeader

EncryptedBlockData

BlockHeaderinclear

EncryptedBlockHeader

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

TDETablespace EncryptionSummary

RMANEncryption RMANCompression

Tablespace EncryptionON Deduplication,NOCompression NODeduplication, AlreadyCompressed

Tablespace Encryption OFF NODeduplication, NOCompression NODeduplication, AlreadyCompressed

Duetotheeffectonbackupcompressionwhenusingtablespaceencryption,bestpracticeistouseHCCorOLTPcompressionsothatthesourcedataisalreadycompressedandencryptedpriortobackup.

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

ProgramAgenda

OracleBackupandRecoverysolutionsoverview

TransparentDataEncryption– BackupImplications

LeveragingBackupforCloudMigrations

ZDLRAandRMAN– ExelonExperience

1

2

3

4

18

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

AdvantagesofCloudBackups

• OracleDatabaseBackupCloudModuleenableson-premisesDatabasestobebackeduptoOracleCloudInfrastructureObjectStorage(StandardandArchive)

• Secureoffsitestoragelocation,virtuallyunlimitedscalability.

• RestorecanbeperformeddirectlyintoaDBCloudService,ExaCS orcustomizedDBcreatedinaComputeInstance

• SimpleDRsolutionorusethecloudforTest/Dev

• FacilitateWorkloadMigrationtoCloud

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

OtherpathstoCloudStorageParis

Milan

London Frankfurt Frankfurt

Incr forever

Full&incr

• DataTransferService(forhundredsofTBorPBscalemigrations)

• On-PremisesZeroDataLossRecoveryAppliancecancopyormovebackupstoCloudStorageinnativeRMANformat– ZDLRAcanactasamigrationenginecentralizingbackupsfromnoninternetconnectedlittle-endianDBs

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

• On-premisesdatabaseversion• On-premiseshostoperatingsystemandversion

• On-premisesdatabasecharacterset

• On-premisesmultitenantornon-multitenantDB

• Databaseservicedatabaseversion• Amountofdata,includingindexes• Storagefordatastaging,ifneeded• Acceptablelengthofsystemoutage• Networkbandwidth

21

PlanningforaMigrationtoCloudDatabaseInstancesDatabaseCloudService,Exadata CloudService

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

MigratingtoExaCS orDBCSinstances• RMANCross-PlatformTransportablePDB

• RMANCross-PlatformTransportableTablespaceBackupSets

• RMANCONVERTTransportableTablespace withDataPump

• RMANDUPLICATEfromanActiveDatabase

• DataPump

• RemoteCloning

• RMANTransportableTablespace withDataPump

• Unplugging/PluggingaPDB

• Unplugging/PluggingNon-CDB

• SQLDeveloper

22

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

RMANforCloudMigrationsRMANcrossplatformtransportablePDB

23

• SQL>ALTERPLUGGABLEDATABASEUNPLUGforCDBorexecDBMS_PDB.DESCRIBEfornon-CDB(generatesXML)

• RMAN>BACKUPDEVICETYPESBTFORTRANSPORTPLUGGABLEDATABASE

Mustbelittleendianandcompatiblecharacterset

• RMAN>CATALOGDEVICETYPESBTBACKUPPIECE

• RMAN>RESTOREALLFOREIGNDATAFILES

• SQL>CREATEPLUGGABLEDATABASE

• Runthenoncdb_to_pdb.sql scripttodeleteunnecessarymetadatafromtheSYSTEMtablespace ofthenewPDB

• SQL>ALTERPLUGGABLEDATABASEOPEN

scp XMLfileandencryptionwallet

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

RMANforCloudMigrationsIIRMANCross-PlatformTransportableTablespace BackupSets

24

• SQL>CREATEDIRECTORYdp_for_cloud AS'/u01/app/oracle/admin/orcl/dpdump/for_cloud';

• SQL>ALTERTABLESPACE…READONLY;

• RMAN>BACKUPDEVICETYPESBTFORTRANSPORTTABLESPACE…DATAPUMPFORMAT'/u01/app/oracle/admin/orcl/dpdump/for_cloud‘;

Mustbelittleendianandcompatiblecharacterset

• preparethedatabasebycreatingtherequiredschemasandusers.

• RMAN>CATALOGDEVICETYPESBTBACKUPPIECE…;

• RMAN>RESTOREDEVICETYPESBTTABLESPACE…TONEWDUMPFILEDATAPUMPDESTINATION‘……';

scp DPfilesandencryptionwallet

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

RMANforCloudMigrationsIIIRMANConvertCross-PlatformTransportableTablespace BackupSets

25

• SQL>CREATEDIRECTORYdp_for_cloud AS'/u01/app/oracle/admin/orcl/dpdump/for_cloud';

• SQL>ALTERTABLESPACE…READONLY;

• RMAN>BACKUPDEVICETYPESBTFORTRANSPORTTABLESPACE…DATAPUMPFORMAT'/u01/app/oracle/admin/orcl/dpdump/for_cloud‘;

Mustbecompatiblecharacterset

• RMAN>RESTOREDEVICETYPESBTFROMPLATFORM'Solaris[tm]OE(64-bit)'foreigndatafile ..FORMAT'/…../DBSOL11.26_SOE_INDX_02.1539554166.dbf‘FROMBACKUPSET…;

scp DPfilesandencryptionwallet

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

RMANforCloudMigrationsIVRMANDuplicatefromActiveDatabase

26

• PatchsourceDBtothesamelevelofdestinationDB

• DestinationDBmustbesameeditionassource• DBcreatedwheninstanceisprovisionedcanbedeleted• Preparethetargetinstance(listener,wallet,storage)• MakesuresourceDBisreachableonport1521• Startlistenerandinstanceinnomount mode• RMAN>rman targetsys/sourcePassword@sourceNode:1521/SourceDb

auxiliarysys/auxSysPassword@destNode:destListenerPort/auxService• RMAN>duplicatetargetdatabasetodestDb asencryptedfromactive

database• passwordfilespfile• <spfile params>• nofilenamecheck

scp encryptionwalletifsourceDBisTDEencrypted

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

RMANforCloudMigrationsVUsingOCIDataTransferService

27

• UseexternaldiskdrivesorastorageappliancetoperformaRMANbackuptodisk

• ShipmediatoOracle

“convert”thediskbackupformattocloudbackup

RMAN>SENDCHANNELt1‘

2>exportbackuppiece /import/o1_mf_nnn.bkp,

3>exportbackuppiece /import/c-40712312-01’;

Performrestoreasinpreviousexamples

scp encryptionwallet

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

ProgramAgenda

OracleBackupandRecoverysolutionsoverview

TransparentDataEncryption– BackupImplications

LeveragingBackupforCloudMigrations

ZDLRAandRMAN– ExelonExperience

1

2

3

4

28

RMAN with ZDLRA at Exelon

Who am I?

• Been a DBA since 1992 – Oracle 6.0.7

• Various development and Unix System Administration

• From Denmark. Immigrated to the US in 1996. Became a US Citizen in 2015

• Worked in a variety of industries like travel, TV, online gambling and energy

• Currently a DBA Engineer for Exelon Corp. since 2007

30

Transmission and Delivery

Who We Are

31

Competitive Energy SalesGeneration

One of the largest U.S. competitive power generators32,000 MW of owned capacityLargest U.S. nuclear fleetRenewables - wind and solar

Retail and wholesale sales through ConstellationApproximately 2.5 million residential, public sector and business customers

Three utilities delivering electricity and natural gas to more than 7.8 million customers:•BGE in Maryland•ComEd in Illinois•PECO in Pennsylvania

Oracle at Exelon

• 2000+ databases total. 320+ production

• DB size ranging from 5GB to 170TB

• Backups to 10 ZDLRA’s– 4 are project specific– 2 are for non-prod

• Replication of all database backups to alternate data center for protection

32

ZDLRA migration reasons

• Old backup hardware was ready for retirement

• Dollar per protected GB was competitive with other solutions

• Need to minimize Data Loss in protected databases

• Weekly backup sizes are smaller and have much less impact on databases

33

ZDLRA – Reduction in volume

• ZDLRA only does 1 full backup and then incremental backups for life.• On average Exelon’s incremental backups are 2% of the total database

size– Huge reduction in IO on local database server– Huge reduction in network traffic– Huge space savings from only storing 1 full backup– No CPU overhead on the local database server from compression.

ZDLRA takes care of that.

34

RMAN Parameter configuration with ZDLRA

35

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 8 BACKUP TYPE TO BACKUPSET;

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_%U' PARMS "SBT_LIBRARY=$ORACLE_HOME/dbs/libra/libra.so, ENV=(RA_WALLET='location=file:$ORACLE_HOME/network/admin credential_alias=baltimore-ingest-scan:1521/baltimore:dedicated')";

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY BACKED UP 1 TIMES TO 'SBT_TAPE';

Database Redo Real Time Transport to ZDLRA

• Database sends redo stream to ZDLRA as a log archive destination.

• Database Uses Oracle Wallet to store credentials for connecting to ZDLRA

36

RMAN> log_archive_dest_5=‘SERVICE=“baltimore-ingest-scan:1521/baltimore:dedicated", VALID_FOR=(ALL_LOGFILES, ALL_ROLES) ASYNC DB_UNIQUE_NAME=baltimore’

Oracle Wallet Setup to ZDLRA

37

sqlnet.ora:

SQLNET.WALLET_OVERRIDE = trueWALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY =$ORACLE_HOME/network/admin ) ) )

Wallet content:

$ mkstore -wrl =$ORACLE_HOME/network/admin -listCredentialOracle Secret Store Tool : Version 12.1.0.2Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.

List credential (index: connect_string username)

1: baltimore-ingest-scan:1521/baltimore:dedicated ravpc1

RMAN Sample backup script to ZDLRA

38

RMAN> connect target /

RMAN> connect catalog /@ baltimore-ingest-scan:1521/baltimore:dedicated

RMAN> backup incremental level 1 cumulative section size 64g filesperset=1 database;

RMAN> backup archivelog all delete all input;

Archivelogs should already be backed up via Real Time Transport but otherwise a simple script can handle that:

RMAN Sample restore script from ZDLRA

39

RMAN> connect target /

RMAN> connect catalog /@ baltimore-ingest-scan:1521/baltimore:dedicated

RMAN> restore database;

RMAN> recover database;

RMAN Sample database clone build script from ZDLRA

40

RMAN> connect target sys/change_on_install@PROD

RMAN> connect auxiliary /

RMAN> connect catalog /@ baltimore-ingest-scan:1521/baltimore:dedicated

RMAN> run {ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE sbt_tapePARMS='SBT_LIBRARY=$ORACLE_HOME/dbs/libra/libra.so,ENV=(RA_WALLET='location=file:$ORACLE_HOME/network/admin credential_alias=baltimore-ingest-scan:1521/baltimore:dedicated')' FORMAT'%U_%d';

set until time "to_date('10/01/2018','MM/DD/YYYY')";DUPLICATE TARGET DATABASE TO 'TEST';}

RMAN Sample standby database build script from ZDLRA

RMAN> connect auxiliary /

RMAN> connect catalog /@ baltimore-ingest-scan:1521/baltimore:dedicated

RMAN> run {

set DBID 123456789

ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE sbt_tapePARMS='SBT_LIBRARY=$ORACLE_HOME/dbs/libra/libra.so, ENV=(RA_WALLET='location=file:$ORACLE_HOME/network/admin credential_alias=baltimore-ingest-scan:1521/baltimore:dedicated')' FORMAT'%U_%d';

DUPLICATE DATABASE PROD FOR STANDBY DORECOVER NOFILENAMECHECK;

}

41

Summary

• ZDLRA and RMAN makes backups and restores very easy

• In Exelon’s case (35 day retention)– IO and CPU savings by not reading and compressing 360TB/week of

database files for full backups– Network traffic savings of 55TB/week from not performing full

backups (62TB compressed backup vs. 7TB incremental)– Backup media savings of 244TB from only storing 1 full backup

42

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved.

Wrapup

• Considerthechallengesofencryption

• RMANisapowerfultoolforon-premisesorcloudmigrations• IncombinationwithZDLRAcanprovideadditionalbenefits(attendWednesday’ssessions!)

• ZeroDataLossRecoveryAppliance:LeveragingIntegrationwithOracleCloud[PRO4217]– Wednesday,Oct24th,12:30p.m.|Moscone West- Room3007

• ZeroDataLossRecoveryAppliance:Insider’sGuidetoArchitectureandPractices[TIP4218]– Wednesday,Oct24th,4:45p.m.|Moscone West- Room3007

• Moreoncloudmigrations• OracleDatabaseCloudMigration:Fast,Simple,Universal[TRN4033]

– Thursday,Oct25,09:00AM- 09:45AM|Moscone West- Room3004

RMANcontinuestoevolveafter20years

43

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved. Confidential– OracleInternal/Restricted/HighlyRestricted

Q&A

Copyright©2018, Oracleand/oritsaffiliates.Allrightsreserved. Confidential– OracleInternal/Restricted/HighlyRestricted

ZeroDataLossRecoveryAppliance:LeveragingIntegrationwithOracleCloud[PRO4217]Wednesday,Oct24th,12:30p.m.|Moscone West- Room3007

ZeroDataLossRecoveryAppliance:Insider’sGuidetoArchitectureandPractices [TIP4218]Wednesday,Oct24th,4:45p.m.|Moscone West- Room3007

OracleDatabase CloudMigration:Fast,Simple,Universal[TRN4033]Thursday,Oct25,09:00AM- 09:45AM|Moscone West- Room3004

top related