zdlra ha backup recovery - oracle...daily rman backup operations when the upstream recovery...

27

Upload: others

Post on 15-Oct-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer
Page 2: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ZDLRAHighAvailabilityforBackupandRecovery

OracleServerTechnologyHighAvailabilitySystemsDevelopmentMaximumAvailabilityArchitectureSeptember2018

Page 3: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

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

3

Page 4: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

Solutionoverview

Requirements

SetupandConfiguration

Operations

1

2

3

4

4

Page 5: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

1010001001101001010101010001010101

0010101010100010101010010101010010100010101010010101000101010100

0011010010101010100010101010010

101000100110100101010101000101

Reliable&CompleteRecovery

EliminateLongBackupWindows

End-to-EndDataProtection

Control&Monitoring

Scale-OutHardware&Storage

ContinuallyValidatesRecoveryStatus

EngineeredDataProtectionForCompleteRecoverabilityoftheOracleDatabase

ZeroDataLossRecoveryAppliance

5

ArchiveBackuptoCloudStorage

Page 6: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ZDLRAHAforBackup&RecoveryMAAConfiguration

6

• TheOracleMaximumAvailabilityArchitecture(MAA)bestpracticetoprotecttheZDLRAagainstsitedisastersandsystemoutagesistohaveaZDLRAreplica.

• WithaZDLRAreplica,protecteddatabasebackup,redo,andrestoreoperationscontinue,preservingcompletedataprotection.

• ThispresentationwilladdresshowtoconfigureprotecteddatabasefailovertoadownstreamZDLRAwhentheupstreamRecoveryApplianceisunavailableduetounplannedorplannedoutages.

• ThefocusisonRMANbackupandredooperations.Afterconfiguration,noclient-sidechangesarerequiredforthedailyRMANbackupoperationswhentheupstreamRecoveryAppliancehasplannedorunplannedoutages.

• Forthedetailedconfigurationsteps,refertoMyOracleSupportnote:ConfiguringHighAvailabilityZDLRAClientforBackupandRestore(DocID2432144.1)

Page 7: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SolutionOverview

7

Thispresentationprovidesthestepsrequiredtoconfigureaprotecteddatabasefortransparentfailoverofbackupoperations and–whenused- redotransporttoadownstreamRecoveryAppliance. Thefollowingisassumed:

1. Realtimeredotransportisenabled.DuringtheoutageoftheupstreamZDLRA,theredotransportwillfailovertodownstreamZDLRA

2. Theprotecteddatabasesusedinthesubsequentexamplesare12.1(CDB121DR)and12.2(CDB122DR)containerdatabaseswithonepluggabledatabaseeach.

3. AnupstreamRecoveryAppliance(RAHADR1)

4. AdownstreamRecoveryAppliance(RAHADR2)

5. AcommonVPCusercalledHADR_COMMON_VPCUSERwascreatedonbothRecoveryAppliancesandmust usethesamepasswordonboth.

6. AlocalVPCusercalledHADR_LOCAL_VPCUSERcreatedonbothRecoveryAppliancesbutthepasswordcanbedifferentbetweenthetwo.

7. AreplicationserverbetweenRAHADR1andRAHADR2isusingtheVPCuserREPUSER_FROM_HADR1

Page 8: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

Solutionoverview

Requirements

SetupandConfiguration

Operations

1

2

3

4

8

Page 9: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Requirements

9

UpstreamRecoveryApplianceRelease:12.2.1.1.1.201805-RELEASEorlater

DownstreamRecoveryApplianceRelease:12.2.1.1.1.201805-RELEASEorlater

RDBMS12.1.0.2.171017orlater+One-OffPatch25926338

RDBMS12.2.0.1.180116orlater+One-OffPatch27757888

EnterpriseManager13Release2(EM13.2.2.0.180430)orlater

- OR-

Page 10: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

Solutionoverview

Requirements

SetupandConfiguration

Operations

1

2

3

4

10

Page 11: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ZDLRA)- VPCUsersCreation

11

Oneach ZDLRA(RAHADR1andRAHADR2),createtwoVPCusersfortheprotecteddatabase

Onthedownstream ZDLRA(RAHADR2),createtheVPCusertobeusedbythereplicationserverRAHADR1 RAHADR2

Page 12: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ProtectedDatabase)- tnsnames.ora

12

Ontheprotecteddatabaseandoneachdatabaseserver(ifitisRACconfigured)updatethetnsnames.oraundertheoracledatabasehome.

IMPORTANT:Ifra_install.jarwasusedontheprotecteddatabase,ensurethatthereareno${ORACLE_HOME}/dbs/ra${ORACLE_SID}.ora filesonanyofthedatabaseservers.Thepresenceofthisfilehastheeffectofoverridingalltheconfigurationparametersdefinedfurther.

Page 13: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ZDLRA)- ReplicationServercreation

13

OntheUpstreamZDLRA:1. Createareplicationwalletifitdoesnotexist2. AddtheVPCreplicationcredentialstothereplicationwallet3. Createthereplicationserver

RAHADR1 RAHADR2

Page 14: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ZDLRA)- ProtectedDatabaseEnrollment

14

OntheUpstreamZDLRA:1. Createaprotectionpolicytobeusedbytheprotecteddatabase2. AddtheprotecteddatabasetotheZDLRA3. GrantthedatabaseaccesstotheVPCuser

RAHADR1 RAHADR2OntheDownstreamZDLRA:1. Createaprotectionpolicytobeusedbytheprotecteddatabase2. AddtheprotecteddatabasetotheZDLRA3. GrantthedatabaseaccesstotheVPCuser

OntheUpstreamZDLRA:1. Addtheprotectionpolicytothereplicationserver

Page 15: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ProtectedDatabase)- Registration

15

OntheProtectedDatabase:1. Configurethesqlnet.orafilethatwillbeusedbyRMAN

toconnecttothecorrectRecoveryAppliance– iftheprotecteddatabaseisRAC,thisshouldbedoneonallnodes.

2. Createauto-loginwallettostorethetheVPCuserscredentials.

3. CreatecredentialaliasesforeachofthethreecredentialsthatwillbeusedbyRMAN.

4. Verifythatthecredentialsareworkingcorrectly5. RegistertheprotecteddatabasewithRMANinthe

UpstreamZDLRA6. Performatestbackupofthecurrentcontrolfile.7. Listthebackupyoujustcreatedtoverifyitisavailable

onbothUpstreamandDownstreamZDLRA.

Page 16: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ZDLRA)– AddRemainingGrants

16

OntheUpstreamZDLRA(RAHADR1):1. Addthegrantaccesstothe

remainingVPCuser(HADR_COMMON_VPCUSER).

RAHADR1 RAHADR2OntheDownstreamZDLRA(RAHADR2):1. Addthegrantaccesstothetworemaining

VPCusers(HADR_LOCAL_VPCUSERandHADR_COMMON_VPCUSER)

Fromtheprotecteddatabase:1. Verifythatthecredentialsareworkingcorrectly.

Page 17: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ProtectedDatabase)RMANconfiguration

17

Ontheprotecteddatabase:1. ConfiguretheSBT_TAPEchanneldeviceparameters

forusewiththeDR_RAHADRalias.2. Optionallyconfigureadditionalparameters,whichare

bestpracticerecommendations.

Page 18: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ProtectedDatabase)Real-TimeRedoTransport configuration

18

Real-TimeRedoTransportforprotecteddatabasescanbeconfiguredtousetheupstreamRAwhenavailable,andifnot,failovertousethedownstream RA.WhentheupstreamRAbecomesavailableagain,redotransportwillautomaticallyusetheupstreamRA.

Startbyconfiguringtheredo_transport_user andthenchooseeitheroftheoptionsbelow.1. DataGuardBrokercanbeusedtomanagethesettings2. Init.oralog_archive_dest parameters

Page 19: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ProtectedDatabase)Real-TimeRedoTransport configuration(Option1)

19

ConfiguringReal-TimeRedoTransportusingDataGuardBroker

Important:Important:IfRedoTransportdoesnotstart,attempttorestartdatabaseinstancetoregisterandenablenewwalletconfiguration.ForaRACconfiguration,yourestartoneRACinstanceatatimeinarollingfashiontomaintaindatabaseserviceuptime.

Page 20: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SetupandConfiguration(ProtectedDatabase)Real-TimeRedoTransport configuration(Option2)

20

ConfiguringReal-TimeRedoTransportmanually

Important:IfRedoShippingdoesnotstart,thenyoumayneedtobouncetheprotecteddatabase.ForaRACdatabase,thiscanbedoneinarollingfashion.

Page 21: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ProgramAgenda

Solutionoverview

Requirements

SetupandConfiguration

Operations

1

2

3

4

21

Page 22: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Operations(ProtectedDatabase)– CreateRMANbackupscripts

22

Ontheprotecteddatabase:1. Ononeofthehosts,createthe

backup_database_rahadr1.rman textfile.2. Ononeofthehosts,createthe

backup_database_rahadr2.rman textfile.3. LoadtheHADR1scriptintotheRAHADR1

RecoveryAppliance.4. LoadtheHADR2scriptintotheRAHADR2

RecoveryAppliance.5. VerifytheRMANaccesstothescriptusing

theVPCcredentials.

Page 23: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Operations(ProtectedDatabase)– PerformingBackups

23

Ontheprotecteddatabase:1. ThefollowingRMANcommandshouldbeused

forallRMANbackupoperations

Page 24: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Operations(ZDLRA)– BackupPieceGapResolution

24

• Incaseofafailover,thebackupprocess istransparenttotheprotecteddatabase.

• Whentheupstream(RAHADR1)becomesavailableagain,thebackupsthathadfailedovertodownstream(RAHADR2)needtobetransferredbacktoRAHADR1toresolvethegapofvirtualfullbackups.

• ThegaptoberesolvedwillshowasINDEX_BACKUPtasksinORDERING_WAITstateonRAHADR1,asthevirtualfullbackupmetadataispresent(vianormalcatalogreconcilewithRAHADR2configuredasdownstream)butarenotyetphysicallypresentontheappliance.

• Todothis,aPL/SQLscriptwascreatedtolookforINDEX_BACKUPtasksthatareinanORDERING_WAITstateandwillthendeterminewhichbackuppiecesneedtobetransferredtoRAHADR1fromRAHADR2.Itwillthentransferthesepiecesinparallel(ifpossible)backtoRAHADR1usingtheDBMS_RA.POPULATE_BACKUP_PIECEAPI.

• ThescriptfirstloadstheRA_POPULATE_BACKUP_PIECEprocedureintothedatabase,andthencreatesaDBMS_SCHEDULER_JOBthatrunsevery15minutestoseeifthereareanypiecesthatneedtobetransferred.Theinitialqueryisveryquickbutifpiecesarefound,thenthejobwillrunforanextendedperiodoftimeduetotheINDEX_BACKUPtasksthatarecreatedonRAHADR1asaresultoftheDBMS_RA.POPULATE_BACKUP_PIECEcalls.Thescripttobeusedistkrmrshadr.sql.

Page 25: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Operations(ZDLRA)– BackupPieceGapResolution(Cont.)

25

Note:ForcustomersonversionsearlierthanZDLRA12.2.1.1.2-201810-RELEASE,multi-sectionbackupsarenotsupportedbyDBMS_RA.POPULATE_BACKUP_PIECE.

Formulti-sectionbackups,theDBtracefilewithapatternof*pdb_<timestamp>.trc willcontainalistofBACKUPFROMSCNcommandstobeexecutedontheprotecteddatabase(CDB122DR)totheupstreamRA(RAHADR1)toresolvethebackupgap.

AnExampleofthe*pbp_<timestamp>.trc fileshowing6differentfilesthataremulti-sectionbackupsisasfollows:

Note:ForcustomersonZDLRAVersion12.2.1.1.2-201810-RELEASEorlater,theaboverestrictiondoesnotapply,i.e.POPULATE_BACKUP_PIECEsupportsmulti-sectionbackups.Ensurethatthelatesttkrmrshadr.sql scriptisdownloadedfromMOSNote2432144.1and executed onall Recovery Appliances.

Page 26: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.| 26

Page 27: ZDLRA HA Backup Recovery - Oracle...daily RMAN backup operations when the upstream Recovery Appliance has planned or unplanned outages. • For the detailed configuration steps, refer