zdlra ha backup recovery - oracle...daily rman backup operations when the upstream recovery...
TRANSCRIPT
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
ZDLRAHighAvailabilityforBackupandRecovery
OracleServerTechnologyHighAvailabilitySystemsDevelopmentMaximumAvailabilityArchitectureSeptember2018
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SafeHarborStatementThefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.
3
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
Solutionoverview
Requirements
SetupandConfiguration
Operations
1
2
3
4
4
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
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)
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
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
Solutionoverview
Requirements
SetupandConfiguration
Operations
1
2
3
4
8
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-
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
Solutionoverview
Requirements
SetupandConfiguration
Operations
1
2
3
4
10
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SetupandConfiguration(ZDLRA)- VPCUsersCreation
11
Oneach ZDLRA(RAHADR1andRAHADR2),createtwoVPCusersfortheprotecteddatabase
Onthedownstream ZDLRA(RAHADR2),createtheVPCusertobeusedbythereplicationserverRAHADR1 RAHADR2
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.
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SetupandConfiguration(ZDLRA)- ReplicationServercreation
13
OntheUpstreamZDLRA:1. Createareplicationwalletifitdoesnotexist2. AddtheVPCreplicationcredentialstothereplicationwallet3. Createthereplicationserver
RAHADR1 RAHADR2
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SetupandConfiguration(ZDLRA)- ProtectedDatabaseEnrollment
14
OntheUpstreamZDLRA:1. Createaprotectionpolicytobeusedbytheprotecteddatabase2. AddtheprotecteddatabasetotheZDLRA3. GrantthedatabaseaccesstotheVPCuser
RAHADR1 RAHADR2OntheDownstreamZDLRA:1. Createaprotectionpolicytobeusedbytheprotecteddatabase2. AddtheprotecteddatabasetotheZDLRA3. GrantthedatabaseaccesstotheVPCuser
OntheUpstreamZDLRA:1. Addtheprotectionpolicytothereplicationserver
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.
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.
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SetupandConfiguration(ProtectedDatabase)RMANconfiguration
17
Ontheprotecteddatabase:1. ConfiguretheSBT_TAPEchanneldeviceparameters
forusewiththeDR_RAHADRalias.2. Optionallyconfigureadditionalparameters,whichare
bestpracticerecommendations.
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
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SetupandConfiguration(ProtectedDatabase)Real-TimeRedoTransport configuration(Option1)
19
ConfiguringReal-TimeRedoTransportusingDataGuardBroker
Important:Important:IfRedoTransportdoesnotstart,attempttorestartdatabaseinstancetoregisterandenablenewwalletconfiguration.ForaRACconfiguration,yourestartoneRACinstanceatatimeinarollingfashiontomaintaindatabaseserviceuptime.
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
SetupandConfiguration(ProtectedDatabase)Real-TimeRedoTransport configuration(Option2)
20
ConfiguringReal-TimeRedoTransportmanually
Important:IfRedoShippingdoesnotstart,thenyoumayneedtobouncetheprotecteddatabase.ForaRACdatabase,thiscanbedoneinarollingfashion.
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
ProgramAgenda
Solutionoverview
Requirements
SetupandConfiguration
Operations
1
2
3
4
21
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.
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|
Operations(ProtectedDatabase)– PerformingBackups
23
Ontheprotecteddatabase:1. ThefollowingRMANcommandshouldbeused
forallRMANbackupoperations
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.
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.
Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.| 26