28
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |

Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Page 2: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SafeHarborStatement

Thefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,timing,andpricingofanyfeaturesorfunctionalitydescribedforOracle’sproductsmaychangeandremainsatthesolediscretionofOracleCorporation.

2

Page 3: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Oracle(Active)DataGuardBestPracticesandNewFeaturesDeepDive

MaheshGirkar,SeniorDirector,DatabaseHADevelopmentNitinKarkhanis,Director,DataGuardBrokerDevelopmentOctober22,2018

Page 4: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

IncludedwithOracleDatabaseEnterpriseEditionDataGuard:Real-timeDataProtectionandAvailability

PrimaryDataCenter DRDataCenter

AutomaticBlockRepair

DataGuardBroker(EnterpriseManagerCloudControlorDGMGRL)

4

Page 5: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

AlicensableoptiontotheOracleDatabaseEnterpriseEditionActiveDataGuard:AdvancedCapabilities

Zerodatalossatanydistance

PrimaryDataCenter DRDataCenter

AutomaticBlockRepair

DataGuardBroker(EnterpriseManagerCloudControlorDGMGRL)

OffloadFastIncrementalBackups

Offloadread-onlyworkloadtoopenstandbydatabase

5

Page 6: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Agenda

What’snewwithOracle(Active)DataGuardin18c?

ApeekatthefutureofOracle(Active)DataGuard.

1

2

6

Page 7: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Agenda

What’snewwithOracle(Active)DataGuardin18c?

ApeekatthefutureofOracle(Active)DataGuard.

1

2

7

Page 8: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

(Active)DataGuardNewFeatures

• Multi-InstanceRedoApplyEnhancement•  ExtendActiveDataGuard(ADG)environmentsforDataWarehousing•  Fasterapplicationresponseafteraroletransition• ProtectPrimarydatabasefromlostwritestoragefailures•  ExtendthefootprintofActiveDataGuardapplications• Betterprotectionagainstfailedlogins

8

Page 9: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Multi-InstanceRedoApplyEnhancements•  IntroducedinOracleDatabase12cRelease2

• Multi-InstanceRedoapplynowworkswithBlockChangeTrackingenabled– BlockChangeTrackingonastandbyrequiresanActiveDataGuardlicense

9

Page 10: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

DataGuardandDatabaseNologgingImprovements*

•  TwonewmodesareaddedasalternativestotheFORCELOGGINGmode:1.  StandbyNologgingforLoadPerformance•  Ensuresthatstandbyswillreceivethenonloggeddatachangeswithminimumimpacttothespeed

ofloadingattheprimary.•  Thestandbycantransientlyhavenonloggedblocks.Thesenonloggedblockswillbeautomatically

resolvedbymanagedstandbyrecovery.2.  StandbyNologgingforDataavailability•  Ensuresthatallstandbyshavethedatawhentheprimaryloadcommits,butatthecostof

throttlingthespeedofloadingdataattheprimary.•  Thestandbyswillneverhaveanynonloggedblocks.– ThesenewmodescauseMulti-InstanceRedoApplytoreturnanerror•  SingleInstanceRedoapplymustbemanuallyenabledtoproceedpastthenologgingoperation.

10

*AvailableonEngineeredSystemsandOracleCloudonly

Page 11: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

PreserveBufferCacheDuringRoleChange*

•  ThedatabasebuffercachestatewillbemaintainedonanADGstandbyduringarolechange• Automatic,nothingtosetup– ServicesneedtobeconfiguredcorrectlysothatuserswhostayconnectedareonaservicethatisvalidinbothPHYSICAL_STANDBYandPRIMARYroles.

*FirstReleaseCaveat:Onlyavailableonnon-RACActiveDataGuardstandbydatabases.

11

Read/Write Read

Read/Write

ActiveDataGuardStandby

PrimaryFailedPrimary

Primary

Page 12: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

LostwriteprotectiononPrimary•  Lostwritescauseseriouscorruptionsduetostaleblocksappearingasgood–  Applicationsrunningontheprimarycanget“incorrect”staledata.–  Priorfeaturesfocusedondetectionoflostwritesonthestandbyduringredoapply.•  Thiscausesdatalossdilemmas,iftimeelapsesbetweenoccurrenceoflostwriteanditsdetection.

•  Lostwritedetectiononprimarypreventsinconsistenciesfromspreading•  DatabaserecordsSCNofdatablockbeingwrittenina“shadowblock”– Requirestheconfigurationofanewtablespacetypecalled“shadowtablespace”thatcontainsshadowblocks–  TheSCNofdatablocksthatarereadintothebuffercachearevalidatedwithitsSCNsavedintheshadowblocks–  Designisefficientandhasminimaloverhead

•  Standbysremainintact!Applicationsdonotgetinconsistentresults!Noneedtofailover!

12

Page 13: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

CreatingPrivateTemporaryTablesonActiveDataGuard• CreatingPrivate(Local)TemporaryTablesissupportedonanActiveDataGuardstandbydatabase– Theyarestoredinmemoryonthestandby– Visibleonlytothesessionthatcreatedit– Droppedattheendofatransactionorsession

13

Page 14: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

ControlLogin-AttemptsonActiveDataGuard•  TheADG_ACCOUNT_INFO_TRACKINGparameterextendsthecontrolofuseraccountsecurityinformationandreaction– ‘LOCAL’(defaultvalue)continuestoenforcetheexistingbehavior• Maintainslocalcopyofusersaccountinformationinthestandby'sin-memoryview– Loginfailuresareonlytrackedlocallyonaperdatabasebasis– Loginsaredeniedwhenthefailuremaximumisreached

– ‘GLOBAL’triggersthenew,securebehavior• MaintainsasingleglobalcopyofusersaccountinformationacrossallDataGuarddatabases– LoginfailuresacrossalldatabasesintheDataGuardconfigurationcounttowardsthemaximumcount– Loginsanywherewillbedeniedwhenthecountisreached

14

Page 15: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

NewDataGuardBrokerCommands

•  EnhancedScriptingandExecutioncommands• NewVALIDATEcommands

15

Page 16: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

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

SHOWALL

DGMGRL> show all; debug OFF

echo OFF time OFF

observerconfigfile = observer.ora

Page 17: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

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

SETDEBUGON|OFFDGMGRL> set debug on;

DGMGRL> connect sys/@boston;

Password:********

[W000 2018-09-28T10:07:10.924-04:00] Connecting to database using boston.

[W000 2018-09-28T10:07:10.924-04:00] Attempt logon as SYSDBA

[W000 2018-09-28T10:07:11.318-04:00] Successfully logged on as SYSDBA

.

.

.

Connected as SYSDBA.

Page 18: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SETECHOON|OFF

DGMGRL> set echo off; DGMGRL> edit database boston set property logxptmode=async;

Property "logxptmode" updated DGMGRL> set echo on; DGMGRL> edit database boston set property logxptmode=sync; edit database dgc2 set property logxptmode=sync; Property "logxptmode" updated

18

Page 19: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

SETTIMEON|OFF

DGMGRL> set time on; DGMGRL 10:21:04> failover to boston; Performing failover NOW, please wait… Failover succeeded, new primary is “Boston”

DGMGRL 10:21:25>

19

Page 20: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

DGMGRLScripting

Script File: commands.cli

set echo on connect /@boston;

edit database boston set property logxptmode=sync;

20

Page 21: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

DGMGRLScripting

DGMGRL> @commands.cli connect /@boston;

Connected to ”boston" Connected as SYSDG.

edit database boston set property logxptmode=sync; Property "logxptmode" updated

21

Page 22: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

VALIDATEDATABASESPFILE– Validatesparametersettingsbetweentheprimaryandastandbydatabase

– Goodresultànodifferences

22

DGMGRL> validate database boston spfile ; Connecting to “boston”.

Connecting to “newyork”.

No parameter differences found.

Page 23: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

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

VALIDATEDATABASESPFILE(Cont’d) DGMGRL> validate database newyork spfile ; Connecting to ”boston".

Connecting to ”newyork".

Parameter settings with different values: aq_tm_processes: boston (PRIMARY) : 8 newyork : 9

use_large_pages:

boston (PRIMARY) : TRUE newyork : NOT SPECIFIED

Page 24: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

VALIDATENETWORKCONFIGURATION• Validatesthenetworksetupbetweenalldatabasesintheconfiguration

24

DGMGRL> validate network configuration for boston; Connecting to instance ”bos" on database ”boston" ... Connected to ”boston"

Checking connectivity from instance ”bos" on database ”boston to instance ”den" on database ”denver"...

Succeeded. Connecting to instance ”den" on database ”denver" ...

Connected to ”denver" Checking connectivity from instance ”den" on database ”denver to instance ”bos" on database ”boston"...

Succeeded. Oracle Clusterware on database ”boston" is available for database restart.

Page 25: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

VALIDATESTATICCONNECTIDENTIFIER• Validatesthestaticconnectidentifiersetupinunmanagedenvironments– AppliestodatabasesintheDataGuardconfigurationthatdonotuse•  OracleRAC•  RACOneNode•  OracleRestart

– RequiresastaticentrysothattheBrokercan•  Restartadatabaseduringswitchover•  ConvertfromSnapshotStandbybacktoPhysicalStandby•  Reinstateafailedprimaryasastandby

• AlsorunaspartofVALIDATENETWORKCONFIGURATION,ifnecessary

25

Page 26: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

Agenda

What’snewwithOracle(Active)DataGuardin18c?

ApeekatthefutureofOracle(Active)DataGuard.

1

2

26

Page 27: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|

(Active)DataGuardFeaturesfortheFuture

•  ImprovedDataGuardMulti-InstanceRedoApply• ActiveDataGuardDMLRedirection• NewParametersfortuningautomaticoutageresolutionwithDataGuard• BufferCacheonActiveDataGuardpreservedafterroletransitionforRAC•  FlashbackDatabaseenhancementswithDataGuard

27

Page 28: Copyright © 2018, Oracle and/or its affiliates. All … › technetwork › database › exadata › dg...• Maintains local copy of users account information in the standby's in-memory

Copyright©2018,Oracleand/oritsaffiliates.Allrightsreserved.|