DataGuard12.2NewFeatures 1
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Data Guard 12.2 New Features By:CharlesKim,OracleACEDirector,January2017
Viscosity can help with any of your Database Upgrade needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
OracleDatabase12cRelease2,packsamultitudeofnewfeaturesforDataGuardwithhighavailability,dataprotection,anddisasterrecovery.Throughthenewfunctionalitysharedinthispaper,DBAscanprovidebetterprotectionformissioncriticalproductiondatabasesfromhumanerrors,datacorruptions,failures,anddisasters.WiththenewfeaturesinOracle12.2,DBAscandeliverarobustreportingenvironmentwhileaddressingcorporatedisasterrecoverygoals.
CreateaStandbyDatabasewithDBCA Startingwiththisrelease,wecanleveragetheDatabaseConfigurationAssistant(DBCA)command-lineinterface,toinstantiatetheDataGuardstandbydatabasefromtheprimarydatabase.LeveragingtheDBCAcommand-lineinterface,willeliminatemanyofthemanualstepsneededtocreateastandbydatabase.WiththeDBCAcommand-lineinterface,wecanalsoembedpostinstantiationscriptstobeexecutedwiththe–customScriptsoption,asapoststandbydatabaseinstantiationprocess.Formultiplescripts,wecansupplyalistofscriptnamesfollowedbyacomma.Thescriptswillbeexecutedintheorderofthesuppliedlist.Asofthisrelease,severalrestrictionsapply.First,onlynon-multitenant,primarydatabasescanbeinstantiatedasstandbydatabases.Also,RACphysicalstandbydatabasescannotbecreated.ToconvertthesingleinstancedatabasetoRAC,DBAscanleverageOEMCloudControl.DBCAoffersanew-createDuplicateDBparameter,toduplicateadatabasefromtheprimarydatabase.The–createAsStandbyparameter,isavailabletoduplicateastandbydatabasefromtheprimarydatabase.Additionaloptionsfordbcawiththe–createDuplicateDBparameterare:dbca -createDuplicateDB -gdbName global_database_name -primaryDBConnectionString easy_connect_string_to_primary -sid database_system_identifier [-createAsStandby [-dbUniqueName db_unique_name_for_standby]] [-customScripts scripts_list] Forthe–primaryDBConnectionString,wecanprovidetheeasyconnectstringintheformof"host[:port][/service_name][:server][/instance_name]". ThiseliminatestheneedtocreateaTNSNAMES.ORAentry.
DataGuard12.2NewFeatures 2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
SupportforDiagnosticPackwithADGWhenrunninginread-onlymode,withActiveDataGuard(ADG),DBAscanfullyleveragethediagnosticpacktocaptureperformancemetricsdatatotheAWR.ThisalsoallowstheDBAstotakeadvantageofADDM,fromtheAWRrepository.AWRsnapshots,ontheADGstandbydatabasearecalledremotesnapshots.Adatabasenodeisreferredtoasadestination.Adestination,iswherewestoresnapshotsthatarecollectedfromremote,ADGstandbydatabasenodes.RemoteADGstandbydatabasenodes,arereferredtoassources.Eachsourcemusthavetwodatabaselinks,onefordestinationtosourcedatabaselinkandanotheroneforsourcetodestinationdatabaselink.Wecantakeremotesnapshotsmanuallyorautomaticallyatascheduledinterval,andarestartedbyadestinationnode.Insummary:
• Thedestinationcreatesthesnapshot.• ThesourcespushsnapshotdatatothedestinationviaDBLinks.• DBAscanpullAWRreportsonsnapshotdataonthedestination.• DBAscanleverageADDMtoaccessAWRdataforperformancemetrics.
SupportforSQLTuningAdvisorInthisrelease,DBAscaninitiatetheSQLTuningAdvisorontheprimarydatabaseandexecutetheSQLstatementsonaremotedatabase.DBAscanoffloadthetuningworkloadoftheprimarydatabase,totheActiveDataGuardstandbydatabase.TheSQLtuningprocessisinitiatedontheprimarydatabase,buttheSQLtuningprocessworkloadisexecutedontheActiveDataGuardstandbydatabase;whilethedatabaseisopenforread-onlyoperations.TheresultsoftheSQLtuningeffortsarewrittenbacktotheprimarydatabaseoverdatabaselinks.SQLprofilerecommendations,ontheprimarydatabase,areappliedtotheActiveDataGuardstandbydatabase,usingthestandardredoapplymechanism.
NoLoggingChangesforDataGuardNologgingactivitiestotablesandindexes,ontheprimarydatabase,havealwayscausedhavoconDataGuard.DevelopersandevenDBAscontinuetoexecuteSQLcommandswiththenologgingoption,believingthattheoperationisnotloggedintheonlineredostream.Now,nologgingblocksarerecordedinthecontrolfileonthephysicalstandbydatabase.Onthephysicalstandbydatabase,wecanexecutethenewRMANRECOVERDATABASENONLOGGEDBLOCK,torecovernonloggedblocks.BeforeweissuetheRMANRECOVERDATABASENONLOGGEDBLOCK,wemustfirststopmanagedrecoveryprocess.Intheeventweencounterunrecoverableblocksafteraswitchover,theoldprimarydatabasemustbeinamountedstate.
MultipleObservers Oracleaddedthefunctionality,foruptothreeobservers,tomonitorandsupportasingleOracleDataGuardBrokerconfiguration.Eachobservermustbeassignedaname,andthenameassignedtotheobservermustbeuniqueintheconfiguration.Thenameoftheobserverisalsocasesensitive.WhenwestarttheobserverswithDGMGRL,theSTARTOBSERVERcommandisenhancedtoacceptthenameoftheobserver.Inathreeobserverconfiguration,wehaveaconceptofthemasterobserverandtwobackupobservers.Whenfast-startfailover(FSFO)isinitiated,theprimaryandstandbydatabasewillrandomlychoosefromthelistofregisteredobserversanddesignateamasterobserver.Ifthereisnoobserverregistered,thenthefirstobserverthatisstartedbecomesthemasterobserver.ThesubsequentobserversthatjointheFSFOconfiguration,willbecomethebackupobservers.OnlythemasterobserverhastheprivilegeofcoordinatingtheFSFOwiththeDataGuardbroker.Otherregisteredobserversservetheroleofbackupobservers,untilthemasterobserverisnotavailable.
DataGuard12.2NewFeatures 3
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
ObserverplacementcontinuestobeacriticalcomponenttotheDataGuardtopology.Oraclehasalwaysrecommendedtoplacetheobserverinanotherdatacenter.Withmultipleobserversinplay,thesamerecommendationstillholdstrue.Now,withadditionalobservers,thereareotherfactorstoconsider.Weshouldneverplacetheobserversonthesameserverorthesamevirtualserver.Weshouldalsoconsiderplacingoneormoreoftheobserversinseparatedatacenters.Thev$databaseviewintroducestwoadditionalcolumnsFS_FAILOVER_OBSERVER_HOSTandFS_FAILOVER_OBSERVER_PRESENT.TheFS_FAILOVER_OBSERVER_HOSTdisplaysthenameofthehostwherethemasterobserverisrunningfrom.TheFS_FAILOVER_OBSERVER_PRESENTcolumn,designatesifthemasterobserverisassociatedwiththelocaldatabaseanddisplaysavalueofeitherYESorNO.
TheviewV$FS_FAILOVER_OBSERVERS,displaysalltheobserversintheFSFOconfiguration.
Thisviewalsodisplaysthefollowinginformation:
• Observername• Thehostthatitresideson,• Iftheobserveristhemasterobserver• Whenthemasterobserverbecamethemasterobserver• Ifthemasterobserversisconnectedtotheprimaryand/orphysicalstandbydatabase
Foradditionalinformation,pleasevisitthefollowingURL:http://docs.oracle.com/database/122/DGBKR/using-data-guard-broker-to-manage-switchovers-failovers.htm#DGBKR394
SimplifiedObserverManagementWithasingleDGMGRLbrokersession,wecannowmonitorandmanagemultipleObserversfromfast-startfailoverconfigurations.Thisincreasestheoperationalefficiencies,thusreducingthecostofmanagingmultipleDataGuarddatabasesthathavefast-startfailoverconfigurations.
MultipleInstanceRedoApply(MIRA)inRACStartinginOracle12.2,wecanrunRedoApplyalloronsomestandbyinstances.Withthisconceptofmultipleinstanceredoapply(MIRA),RedoApplyperformancecanscaleaswideasthetargetRACconfigurationallows.ThisfeatureiscrucialforExadataandRACcustomerswithdemandinghighworkloadsontheprimarydatabase.ForActiveDataGuardcustomers,theycanhavereal-timeaccesstothedatabeingchurnedontheprimarydatabase.TheALTERDATABASERECOVERMANAGEDSTANDBYDATABASEcommand,nowacceptsnewINSTANCES[ALL|integer]clausetostartRedoApplyonmultipleinstances.TheALLoption,startsredoapplyonalltheRACstandbyinstancesthatareinopenormountmode.Alltheinstancesmustbeinthesamemountedoropenmode;oneinstancecannotbeinopenmode(ActiveDataGuardorread-onlymode)whileothersareinmountedmode.Theintegeroption,specifiesthenumberofRACstandbyinstancesthatwillperformredoapply.WecannotspecifywhichRACinstance(s)willperformtheredoapply.
DataGuard12.2NewFeatures 4
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Startingredoapplyonmultipleinstanceshasthefollowingrestrictions:
• In-Memorycolumnstoreisnotsupported.• BlockChangetracking(BCT)isnotsupported.
Themulti-threadredostreamfromRACprimary,isshippedtothemultiple-nodeRACstandbyinstances.Withmulti-nodeMRP,redoapplyperformanceisnowdirectlycorrelatedtonetworkbandwidthandlatencybetweentheprimaryandstandbydatabaseenvironments.WiththeDGMGRLcommandlineinterface,wecanconfigurewhichRACinstances,inthephysicalstandbyenvironment,applyprocessesshouldbeexecutedtousethenewOracleActiveDataGuardmultipleinstanceRedoApplyfeature.
SubsetStandbysWhentheMulti-tenantoptionwasintroducedinOracleDatabase12cRelease1(12.1),thephysicalstandbywasatthecontainerlevelandallpluggabledatabases(PDBs)hadtoparticipateinthephysicalstandbyconfiguration.AsofOracleDatabase12cRelease2,OracleaddedanewfeaturethatallowsforthenumberofPDBstobereplicatedtothephysicalstandby,CDBdatabase.Priortothisrelease,theENABLED_PDBS_ON_STANDBYinitializationparameteronlysupportedtwovalues:allPDBsornone.Now,wecanprovidealistofPDBstotheENABLED_PDBS_ON_STANDBYinitializationparameter.TheENABLED_PDBS_ON_STANDBYparameter,isonlyapplicableonthephysicalstandbydatabase.Ifthisparameterissetontheprimarydatabases,itisignoredduringthestartupofthedatabase.Ifyouusethisinitializationparameter,werecommendthatyoualsosetthisparameterontheprimarydatabase;incaseyouperformaswitchoverorfailoverandyourprimaryonedaybecomesyourstandbydatabase.Intheabsenceofthisparameter,allPDBsintheCDBarecreatedonthestandbydatabase.TheENABLED_PDBS_ON_STANDBYparameter,canacceptalistofPDBnamesoraglobpatternsuchas“VNAPDB?”,“VNAPDB*a”,or“VNAPDB2”.Globpatternrules,aresimilartoregularexpressionrulesincommonUNIXshells.Thecommonexpressions,suchasasterisk(*)andquestionmark(?)wildcardcharactersaresupported.Thequestionmark(?)representsasingleunknowncharacter;whereastheasterisk(*)representsmatchestoanynumberofunknowncharacters.Thisparameteralsoacceptsaminussign(-),whichcanbeusedasthefirstcharacterinaPDBname,todesignatethatthePDBshouldbeexcludedonthestandbydatabase.PDBnamesandrulesassociatedwiththePDBs,shouldbeenclosedwithdoublequotationmarks.OraclewillremovethedoublequotationmarkbeforeprocessingthePDBlist.Hereareseveralexamplesofthisparameterusage:
• ENABLED_PDBS_ON_STANDBY=“*”meansthatallPDBswillbecreatedonphysicalstandby.• ENABLED_PDBS_ON_STANDBY=“VNAPDB1*”meansthatVNAPDB1A,VNAPDB1B,andVNAPDB1Cwillbecreatedonthe
physicalstandby.• ENABLED_PDBS_ON_STANDBY=“VNAPDB*A”meansthatVNAPDB1A,VNAPDB2A,andVNAPDB3Awillbecreatedon
physicalstandby.• ENABLED_PDBS_ON_STANDBY=“VNAPDB1*”,“-VNAPDB*A”meansthatVNAPDB1BandVNAPDB1Cwillbecreatedon
physicalstandbybutVNAPDB1Awillbeexcluded
IntheCREATEPLUGGABLEDATABASE…STANDBYS=statement,anewoptionisintroducedinOracle12.2.WehaveanEXCEPTclausetodesignatewhichCDBwedonotwantthisPDBtobeexcludedfrom.InOracle12.1,theCREATEPLUGGABLEDATABASE…STANDBYS=accepted:
• alistofCDBsthatyouwantthisPDBtoreplicateto:{('CDB1','CDB2',...)• NONE• ALL
Now,theALLoptionisenhancedtospecifyexclusionofCDBs:ALL[EXCEPT('MYCDB','YOURCDB',...)
DataGuard12.2NewFeatures 5
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
DataGuardDatabaseCompareAnewPL/SQLprocedure,calledDBMS_DBCOMP.DBCOMP,isintroducedtodetectlostwritesandtoidentifyinconsistenciesbetweentheprimaryandphysicalstandbydatabase.Thissuppliedprocedurecomparesthematchingdatablocksontheprimaryandphysicalstandbydatabases.ThecoolestthingaboutthisparameteristhatitdoesnotrequiretheDB_LOST_WRITE_PROTECTparametertobeset.Thisprocedurecanbeexecutedatanytime,andyoucanmonitortheprogressbyqueryingtheV$SESSION_LONGOPSview.Thedbverifyutilitycannotdetectforlostwritediskerrors;insteadtheDBAwouldleveragethisproceduretodetectforsilentcorruptionsintroducedbythestoragearrayatthephysicalstandbydatabase.Oraclealreadyvalidatesdatabeingreadorchangedonboththeprimaryorstandbydatabase.Thisstoredprocedurecanprovidecomprehensivevalidationoftheentiredatabaseincludingdormantdata.TheDBCOMPprocedurecanbeexecutedontheprimaryoronthephysicalstandbywiththedatabaseinMOUNTorOPENmode.Thisprocedureacceptsthreeparameters:DBMS_DBCOMP.DBCOMP ( datafile IN varchar2, outputfile IN varchar2, block_dump IN boolean); Thedatafilecanbeanumber,nameofthedatafileorALLforallthedatafiles.Theoutputfile,isaprefixinthenameoftheoutputfile.Alloutputisstoredinthe$ORACLE_HOME/dbsdirectoryandcanbemodifiedwitheitherrelativeorabsolutepath.TheblockdumpparameterisaBooleanparameter;bydefault,thisparameterisFALSE.WecansetthisBooleanparametertoTRUE,ifwewantthecontentoftheblocktobedumpedintotheoutputfile,whenapairofblocksbetweentheprimaryandstandbydatabasesisnotthesame.Here’sasamplecodeexampleoftheDBCOMPprocedure:DECLARE DataFile VARCHAR2(1000); OutputFile VARCHAR2(1000); BEGIN DataFile := 'all' ; OutputFile:='BlockCompareFULL_'; SYS.DBMS_COMP.DBCOMP(DataFile, OutputFile, true); END; /
BrokerBlockComparisonToolTheDataGuardBrokerisenhancedtotakeadvantageofthisfeaturetoo.ThenewcommandVALIDATEDATABASEDATAFILE,providesthesamefeatureastheDBCOMPprocedure.JustliketheDBCOMPprocedure,wecanvalidatethedatabaseatthedatafileleveloratthedatabaselevel.BelowareoptionsfortheVALIDATEDATABASEDATAFILEcommandwiththeDataGuardBroker:VALIDATE DATABASE [database-name | ALL] DATAFILE [datafile-name | datafile-number | ALL] OUTPUT="output-file-name"; Theoutputfileisgeneratedinthetracedirectory.SimilartotheDBCOMPprocedure,wecanspecifythedatafilename,datafilenumberortheALLoptionforallthedatabasefiles.Belowisanusageexample:DGMGRL> VALIDATE DATABASE prod DATAFILE ALL OUTPUT=BlockCompareFULL_prod.out;
DataGuard12.2NewFeatures 6
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
AutomaticPasswordFileSynchronizationEffectiveOracle12.2,whenthepasswordforSYS,SYSDBA,SYSOPERand/orSYSDGaremodified,thepasswordfileisupdatedontheprimarydatabase.Thechangesmadeonthepasswordfile,arereplicatedtothepasswordfilesonalltheORACLE_HOMEdatabasesontheDataGuardconfiguration.Thepasswordfileisupdatedonthephysicalstandbydatabaseserverwhenredoisapplied.Forfarsyncconfigurations,thechangestothepasswordfilemustbemanuallycopied.Thisisbecauseafarsyncserverreceivesredoinformation,butdoesnotapplyredo.Whenthepasswordfileisupdatedonthefarsyncserver,thepasswordwillautomaticallybepropagatedtothetarget,physicalstandby,databaseservers.
In-MemorySupportforADGStartinginOracleDatabase12cRelease2,theIn-Memory(IM)ColumnStoreissupportedonthestandbydatabase,ifyouarerunningActiveDataGuard.TheIMoptioncanbeconfiguredontheprimarydatabase,onanADGstandbydatabase,oronboththeprimaryandtheADGstandbydatabases.OntheActiveDataGuardenvironment,theINMEMORY_ADG_ENABLEDparameterneedstobeenabledinadditiontothein-memorycachesize.Bydefault,theINMEMORY_ADG_ENABLEDparameterissettotrue.Thisparameterisonlyapplicableonthestandbydatabases.ForRACconfiguration,thisparametermustbesettothesamevalueacrossalltheRACinstances.Theparameterhasnorelevanceonaprimarydatabase.
MinimizeImpacttoPrimaryDatabaseswithMultipleSyncStandbyDatabasesOracleintroducedanewinitializationparametercalledDATA_GUARD_SYNC_LATENCY,whichallowsyoutospecifyhowlongtheprimarydatabaseLogWriter(LGWR)shouldwaitforaresponse,frommultiplesynchronousstandbydatabasesduringredotransport.Thedefaultvalueof0,specifiesthattheLGWRprocesswillwaituntilthenumberofsecondsspecifiedbytheNET_TIMEOUTattributeoftheLOG_ARCHIVE_DEST_Nparameter.TheNET_TIMEOUTredotransportattribute,specifiesthedurationinsecondsforhowlongtheprimarydatabaseneedstowaitforaresponse,fromeachofthestandbydatabaseinSYNCredotransport.PriortoOracle12.2,withmultiplesynchronousstandbydatabases,theprimarydatabasemustwaitforallsynchronousstandbydatabasestoacknowledgereceiptoftheredoorexceedtheirindividualNET_TIMEOUTperiodbeforecontinuing.ThisDATA_GUARD_SYNC_LATENCYparameterdefinesthenumberofsecondsthattheprimarydatabasemustwait;onceoneofthesynchronousstandbydatabasesacknowledgesreceiptsoftheredo.Othersynchronousdatabasedestinationsmustreturnreceiptwithinthisthresholdorbecomedisconnectedfromtheprimarydatabase.Here'sanexamplewithfoursynchronousstandbydestinationsandtheDATA_GUARD_SYNC_LATENCYparameterissetto2(2seconds).Ifthefirststandbydatabaseacknowledgesredoreceiptimmediately,theremainingthreestandbydatabaseshaveupto2secondstorespondwithacknowledgementofredoreceipt.TheprimarydatabasewillnotwaitmorethanthespecifiedthresholdspecifiedintheDATA_GUARD_SYNC_LATENCYparameter.Ifoneormoreoftheremainingsynchronous,physicalstandbyconfigurationsfailtoacknowledgeredoreceipt,theLGWRwilldisconnectfromthestandbydatabaseandputthedestinationinerrorstate.Theprimarydatabasestilloperatesinzerodataloss,MaximumProtectionmode,sinceoneofthesynchronousstandbydatabaseshasacknowledgedreceiptofredo.OncethedurationoftheREOPENattributesecondshaveelapsed,LGWRwillreconnecttothefailedsynchronousstandbydatabases.YoucannotsetthevalueofDATA_GUARD_SYNC_LATENCYtobegreaterthanthevalueofNET_TIMEOUT.LGWRwillnotwaitlongerthanthevalueofNET_TIMEOUTattributeoftheLOG_ARCHIVE_DEST_nparameter.
DataGuard12.2NewFeatures 7
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
DUPLICATECommandEnhancementsforDGAsofOracle12.1,wearerestrictedtocreatingaphysicalstandbydatabasewhenweareconnectedtoaphysicalstandbydatabase,asthetargetdatabasewiththeDUPLICATEcommand.InOracle12.2,OracleextendstheDUPLICATEcommandtocreateadatabasefromthephysicalstandbydatabase.OraclealsoenhancedtheDUPLICATEcommandtocreatethefarsyncstandbyinstance.WecansubstitutethekeywordSTANDBYwithFARSYNConthecommandline(theDORECOVERoptionnotallowedforfarsyncinstances)tocreateafarsyncinstance.Thefollowingcommandwillcreateafarsyncinstancefromtheactivedatabase:DUPLICATE TARGET DATABASE FOR FARSYNC FROM ACTIVE DATABASE; WecanalsocreateaDataGuardfarsyncinstancefromabackup-basedduplication.Usingthepreviouscommandabove,wesimplyexchangeFROMACTIVEDATABASEtoBACKUPLOCATION‘+DATA/backup’:DUPLICATE TARGET DATABASE FOR FARSYNC BACKUP LOCATION '+DATA/BACKUP';
ConnectionPreservationDuringRoleChangesWhenaroletransitionhappenswheretheActiveDataGuardconfigurationbecomesthenewprimarydatabase,allconnectionsestablishedontheADGareterminated;andconnectionsmustbere-establishedwhichcausesstateinformationtobelost.StartingwithOracle12.2,connectionsalreadyestablishedontheADGdatabasewillnotbedisconnectedduringaroletransitiontoaprimarydatabase.Asweincorporateadatabaseservicethatisarchitectedtorunbothprimaryandthestandbydatabases,userswillstayconnectedastheroletransitionoccurs.Ifweuseadatabaseservicethatonlyconnectstothestandbydatabase,usersessionswillbeterminatedandforcedtore-connect.
Data Guard Broker TheDataGuardbrokerisadistributedmanagementframeworkleveragedtocreate,manage,maintain,andmonitortheDataGuardenvironment.Witheachrelease,OracleenhancestheDGbroker.ThissectiondescribesthenewfeaturesandcapabilitiesthatwereaddedtoOracleDataGuardbrokerinOracleDatabase12cRelease2:
OracleDataGuardBrokerSupportforExecutingDGMGRLCommandScriptsTheBrokerallowsforscriptstobeexecuted,likeSQL*Plus,withthe@sign(i.e.@scriptname).Eachlineinthescriptmusthaveasemi-colon(;)attheend.Wecannotexecutethecommand“StartObserver”inthescript.Allcommandsafterthe“StartObserver”commandwillbeignored.Wecan,however,usethecommand“StartObserverInBackground;”,andCommandssubsequenttothiscommandwillbeaccepted.JustlikeSQL*Plus,wecanusethewordREMor--(twodashesfollowedbyaspace),tocommentaline.Similarly,OScommandssuchashostor!,canbeexecutedaswedoinSQL*Plus.
BrokerSupportforRedoTransportDestinationsofDifferentEndianesswithZDLRAWiththeZDLRAinplay,OracleDataGuardbrokercanmanagearemote,redodestinationthathasadifferentendianessthantheprimarydatabase.Forexample,thisallowstheOracleDataGuardbrokertomanageandconfigureOracleDataGuardtransportservicesonLinux(oronExadataorevenonOracleDatabaseCloud),whentheprimarydatabaseresidesontheAIXoperatingsystem.ImaginethecapabilitiesofcrossplatformmigrationswiththeZDLRA,andtheabilitytosynchronizedatabasesofheterogeneousconfigurationswithdifferentendianness.ThisfeaturewillsignificantlyimprovetheflexibilityofmigratingdatabasesfromoneplatformtoanotherwithZDLRA.
DataGuard12.2NewFeatures 8
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
BrokerSupportforMultipleAutomaticFailoverTargetsStartinginOracle12.2,wehavethecapabilitytoconfiguremultiplefailovertargets,inafast-startfailoverconfiguration.Wecandesignateoneormorefailovertargetstoachieveahigherlevelofsuccessforautomaticfailover,whentheneedarises.ItisalsopossibletosetoneormoreDB_UNIQUE_NAMEtotheDataGuardBroker,FastStartFailoverTargetproperty.Thelistoftargetstandbydatabases,arecalledcandidatefast-startfailovertargets.Thesecandidate,fast-start,failovertargetscannotbeafarsyncinstance,asnapshotstandbydatabaseoraZDLRA.TheFastStartFailoverTargetproperty,canbesettothelistofDB_UNIQUE_NAME,andthebrokerwillattemptfailoverintheordertheyarelisted.IfthepropertyissettothekeywordANY,thenthebrokercanselectanyofthecandidatetargetsasthecurrent,fast-start,failovertarget.TochangetheFastStartFailoverTargetpropertyforthecandidatefast-startfailovertargets,wemustdisablefast-startfailover,modifytheFastStartFailoverTargetproperty,andre-enablefast-startfailover.
Support for ADG Rolling Upgrades StartinginOracle12.2,thebrokerdoesnothavetobedisabledduringarollingupgrade.InOracle12.1,OracleintroducedrollingupgradesforADG,bysimplifyingtheprocessofbecomingatransientlogicalstandbydatabasebyautomatingthemanualstepswiththeDBMS_ROLLINGpackage.InOracle12.2,thebrokernowsupportsrollingupgrades.Duringtherollingupgradeprocess,the“showconfiguration”commandfromDGBrokerwillreportthestatusof“ROLLING DATABASE MAINTENANCE IN PROGRESS”. Duringtherollingupgradeprocess,FSFmustbedisabled.WiththeDGBrokermanagedrollingupgrades,DBAswillbeabletodelivermorereliablerollingupgradeswithminimaldowntimeandrisk.
Data Guard Broker PDB – Migrate PDB OraclehassuppliedanewcommandtotheDataGuardBroker,MIGRATEPLUGGABLEDATABASE.ThisallowsmovementofasinglePDBfromonecontainertoanotherorfailoveraPDBfromthestandbydatabase,toanewproductioncontainerdatabase.Severalusecasesinclude:
1. MovingaPDBfromonecontainertoanothercontainer,onthesameserver;2. FailoveraPDBfromaphysicalstandbydatabase,toanewproductiondatabaseonthesamephysicalstandby
server.
Ineitherofthescenarios,datafilesforthePDBbeing“migrated”mustbepresentedandmadeavailable,toboththecurrentcontainerdatabaseandthetargetcontainerdatabase.WhenyoumigrateaPDBfromonecontainerdatabasetoanotherdatabase,thedatabaseversionmustbeequalorhigherthanthesourcecontainer.IfthePDBbeingmigratedisatalowerversionthanthetargetcontainerdatabase,thePDBmustbeupgradedfirstpriortobeingused.ThesourceandtargetCDBsmustparticipateindifferentDataGuardBrokerconfigurations.IfthesourceCDBhappenstobeaphysicalstandbydatabase,thesourceandtargetCDBsmustberunningonthesameversionandpatches,andmusthavethesamecompatibleinitializationparameter.WhenthesourceCBDisaprimarydatabase,thetargetCDBcannotbeonalowerversionofOracle.Likewise,thecompatibleinitializationonthetargetCDBcannotbeonalowerversion.
Enhancement for Alternate Destinations (GROUP and PRIORITY) AsofOracle12.2,theGROUPandPRIORITYattributesofLOG_ARCHIVE_DEST_nparameterhavereplacedtheALTERNATEattributeforremotedestinations.Theseattributesareusedtoconfigurealternateredotransportpaths,tothestandbydatabase,whenthefarsyncinstanceisnotavailable.
Fast-StartFailoverinMaximumProtectionModeNow,OracleDataGuardsupportsFSFOinMaximumprotectionmodeforzerodatalossprotection,whenmultiplesynchronousdestinationsexist.
DataGuard12.2NewFeatures 9
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
TableofContentsCREATEASTANDBYDATABASEWITHDBCA ERROR!BOOKMARKNOTDEFINED.SUPPORTFORDIAGNOSTICPACKWITHADG 2SUPPORTFORSQLTUNINGADVISOR 2NOLOGGINGCHANGESFORDATAGUARD 2MULTIPLEOBSERVERS 2SIMPLIFIEDOBSERVERMANAGEMENT 3MULTIPLEINSTANCEREDOAPPLY(MIRA)INRAC 3SUBSETSTANDBYS 4DATAGUARDDATABASECOMPARE 5BROKERBLOCKCOMPARISONTOOL 5AUTOMATICPASSWORDFILESYNCHRONIZATION 6IN-MEMORYSUPPORTFORADG 6MINIMIZEIMPACTTOPRIMARYDATABASESWITHMULTIPLESYNCSTANDBYDATABASES 6DUPLICATECOMMANDENHANCEMENTSFORDG 7CONNECTIONPRESERVATIONDURINGROLECHANGES 7DATA GUARD BROKER 7ORACLEDATAGUARDBROKERSUPPORTFOREXECUTINGDGMGRLCOMMANDSCRIPTS 7BROKERSUPPORTFORREDOTRANSPORTDESTINATIONSOFDIFFERENTENDIANESSWITHZDLRA 7BROKERSUPPORTFORMULTIPLEAUTOMATICFAILOVERTARGETS 8SUPPORT FOR ADG ROLLING UPGRADES 8DATA GUARD BROKER PDB – MIGRATE PDB 8ENHANCEMENT FOR ALTERNATE DESTINATIONS (GROUP AND PRIORITY) 8FAST-STARTFAILOVERINMAXIMUMPROTECTIONMODE 8
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the First Day of 12.2, my DBA gave to me… RAC and Grid Infrastructure New Features ByNitinVengurlekar,CTOViscosityNorthAmerica
December12,2016
Thefollowinglistillustratesthenew12.2OracleRACandGridInfrastructure.Thisisapersonal
listwhich“Ibelievetobethemostinteresting.”IapologizetotheRACDevteamifIleftout
anyfeatures.
Technology Overview
Database:12c12.2
Company:OracleCorporation
Technology:RACandGrid
Infrastructure
Viscosity can help with any of your 12.2 needs
Viscosityhasperformed
numerouszero-downtime
databasemigrationsand
upgradesovertheyearsandhas
aproventrackrecordwith
businesscriticalandmission
criticaldatabases.
Viscosity’sDatabaseMigration
&UpgradeServicescanplan,
upgrade,validateandmigrate
alldatabasecontent-quickly
andeffectivelywithour
automatedapproachand
provenmethodology.
Learnmoreabouthowyoucan
maintainandmaximizeyour
investmentsatviscosityna.com.
Formoreinformation,emailus
Streamlined Grid Infrastructure Installation
12.2GridInfrastructuresoftwareisavailableasanimagefilefordownloadandinstallation.The
keyobjectiveofthisfeaturewastoenableasimplerandquickerinstallationofGrid
Infrastructure.AdministratorssimplyprepthesystembycreatinganewGridhomedirectory,
appropriateusers,permissionsandkernelsettings.Oncecompleted,Adminsextracttheimage
fileintothenewly-createdGridhome,andexecutethegridsetup.shscripttoinvokesetup
wizardtoregistertheOracleGridInfrastructurestackwithOracleinventory.Thisinstallation
approachcanbeusedforOracleGridInfrastructureforClusterandStandaloneServers
configurations.Thisnewsoftwareinstallationwillimprovelargescaledeploymentautomation
aswellasdeploymentofcustomizedimages,PatchSetUpdates(PSUs)andpatches.
Real Application Clusters Reader Nodes
In12.2,OracleextendedthecapabilityofFlexClustersbyintroducingReadernodes.Reader
nodesareLeafnodes(inaFlexCluster)thatrunread-onlyRACdatabaseinstances.TheReader
nodesarenotaffectedbyRACreconfigurations,causedbynodeevictionsorotherclusternode
membershipchanges,aslongastheHubNode,towhichitisconnected,ispartofthecluster.
ReaderNodesallowsuserstocreatehugereaderfarms(upto64readernodesperHubNode),
thusenablingmassiveparallelprocessing.Inthisarchitecture,updatestotheread/write
instances(runningonHubnodes)areimmediatelypropagatedtotheread-onlyinstanceson
theLeafNodes,wheretheycanbeusedforonlinereportingorinstantaneousqueries.Users
cancreateservicestodirectqueriestoread-onlyinstancesrunningonreadernodes.
Service-Oriented Buffer Cache Access
RACServices,whichareusedtoallocateanddistributeworkloadsacrossRACinstances,arethe
cornerstoneofRACworkloadmanagement.ThereisastrongrelationshipbetweenaRAC
Service,aspecificworkload,andthedatabaseobjectitaccesses.With12.2RAC,aService-
orientedbuffercachefeaturewasintroducedtoimprovescaleandperformance,byoptimizing
instanceandnode-buffercacheaffinity.Thisisdonebycachingorpre-warminginstanceswith
datablocksforobjectsaccessedwhereaserviceisexpectedtorun.
Server Weight-Based Node Eviction
Whenthereisaspilt-brain,orwhenanodeevictiondecisionmustbemade,traditionallythe
decisionwasbasedonage,ordurationofthenodes,inthecluster;i.e.,nodeswithalarge
uptimeintheclusterwillsurvive.In12.2RAC,Serverweight-basednodeevictionusesamore
intelligent,tie-breakermechanismtoevictaparticularnodeoragroupofnodesfromacluster.
TheServerWeight-basednodeevictionfeatureintrospectsthecurrentloadonthoseserversas
partofthedecision.Twoprinciplemechanisms,asysteminherentautomaticmechanismanda
userinput-basedmechanismisusedtoofferandprovideguidance.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Load-Aware Resource Placement
Load-aware resource placement, prevents overloading a server with more database instances than the server is capable of running. The metrics used to determine whether an application can be started on a given server, is based on the expected resource consumption of the application, as well as the capacity of the server in terms of CPU and memory. Administrators can define database resources such as CPU (cpu_count) and memory (memory_target) to Clusterware. Clusterware uses this information to place the database instances only on servers that meet a sufficient number of CPUs, amount of memory or both.
srvctl modify database -db testdb -cpucount 8 -memorytarget 64g
Hang Manager
The Hang Manager features first became available in 11gR1. In this initial version, Hang Manager evaluated and identified system hangs, then dumped the relevant information, “wait for graph,” into a trace file. In 12.2, Hang Manager takes action and attempts to resolve the system hang. An ORA-32701 error message is logged in the alert log to reflect the hang resolution. Hang Manager also runs in both single-instance and Oracle RAC database instances. With Hang Manager, it is constantly aware of processes running in reader nodes instances, and checks whether any of these processes are blocking progress on Hub Nodes to take action, if possible.
Separation of Duty for Administering RAC Clusters
12.2 RAC introduces a new administrative privilege called SYSRAC. This privilege is used by the Clusterware agent, and removes the need to use SYSDBA privilege for RAC administrative tasks, thus reducing the reliance on SYSDBA on production systems. Note, SYSRAC privilege is the default mode for connecting to the database by Clusterware agent; e.g, when executing RAC utilities such as SRVCTL.
Rapid Home Provisioning of Oracle Software
Rapid Home Provisioning enables you to create clusters, provision, patch, and upgrade Oracle Grid Infrastructure and Oracle Database homes. It also provisions 11.2 Clusters, applications, and middleware using Rapid Home Provisioning.
Extended Clusters
In 12.2 GI Administrators can create an extended RAC cluster across two, or more, geographically separate sites. Note, each site will include a set of servers with its own storage. If a site fails, the other site acts as an active standby. 12.2 Extended Clusters can be built on initial installation or be converted from an existing (non-Flex ASM) cluster, using the ConvertToExtended script.
De-support of OCR and Voting Files on Shared Filesystem
In Grid Infrastructure 12.2, the placement of Oracle Clusterware files: the Oracle Cluster Registry (OCR), and the Voting Files, directly on a shared file system is desupported. Only ASM or NFS is supported. If you need to use a supported shared file system, either a Network File System, or a shared cluster file system instead of native disk devices, then you must create Oracle ASM disks on supported network file systems that you plan to use for hosting Oracle Clusterware files before installing Oracle Grid Infrastructure. You can then use the Oracle ASM disks in an Oracle ASM disk group to manage Oracle Clusterware files. If your Oracle Database files are stored on a shared file system, then you can continue to use shared file system storage for database files, instead of moving them to Oracle ASM storage.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Second Day of 12.2, my DBA gave to me… Data Guard New Features
December13,2016
Technology Overview
Database:12c12.2
Company:OracleCorporation
Technology:DataGuard
Viscosity can help with any of your 12.2 needs
Viscosityhasperformed
numerouszero-downtime
databasemigrationsand
upgradesovertheyearsandhas
aproventrackrecordwith
businesscriticalandmission
criticaldatabases.
Viscosity’sDatabaseMigration
&UpgradeServicescanplan,
upgrade,validateandmigrate
alldatabasecontent-quickly
andeffectivelywithour
automatedapproachand
provenmethodology.
Learnmoreabouthowyoucan
maintainandmaximizeyour
investmentsatviscosityna.com.
Formoreinformation,emailus
Multiple Observers
OracleaddedthefunctionalityforuptothreeobserverstomonitorandsupportasingleOracleDataGuardBrokerconfiguration.Eachobservermustbeassignedaname.Thenameassignedtotheobservermustbeuniqueintheconfiguration.Thenameoftheobserverisalsocasesensitive.WhenwestarttheobserverswithDGMGRL,theSTARTOBSERVERcommandisenhancedtoacceptthenameoftheobserver.Inathreeobserverconfiguration,wehaveaconceptofthemasterobserverandtwobackupobservers.Whenfast-startfailover(FSFO)isinitiated,theprimaryandthestandbydatabaserandomlychoosefromthelistofregisteredobserversanddesignatesamasterobserver.Ifthereisnoobserverregistered,thenthefirstobserverthatisstartedbecomesthemasterobserver.ThesubsequentobserversthatjointheFSFOconfigurationbecomethebackupobservers.OnlythemasterobserverhastheprivilegeofcoordinatingtheFSFOwiththeDataGuardbroker.Otherregisteredobserversservetheroleofbackupobserversuntilthemasterobserverisnotavailable.ObserverplacementcontinuestobeacriticalcomponenttotheDataGuardtopology.Oraclehasalwaysrecommendedtoplacetheobserverinanotherdatacenter.Withmultipleobserversinplay,thesamerecommendationstillholdstrue.Now,withadditionalobservers,thereareotherfactorstoconsider.Weshouldneverplacetheobserversonthesameserverorthesamevirtualserver.Weshouldalsoconsiderplacingoneormoreoftheobserversinseparatedatacenters.Thev$databaseviewintroducestwoadditionalcolumnsFS_FAILOVER_OBSERVER_HOSTandFS_FAILOVER_OBSERVER_PRESENT.TheFS_FAILOVER_OBSERVER_HOSTdisplaysthenameofthehostwherethemasterobserverisrunningfrom.TheFS_FAILOVER_OBSERVER_PRESENTcolumndesignatesifthemasterobserverisassociatedwiththelocaldatabaseanddisplaysavalueofeitherYESorNO.
TheviewV$FS_FAILOVER_OBSERVERSdisplaysalltheobserversintheFSFOconfiguration.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Thisviewalsodisplaysthefollowinginformation:
• observername• thehostthatitresideson,• iftheobserveristhemasterobserver• whenthemasterobserverbecamethemasterobserver• ifthemasterobserversisconnectedtotheprimaryand/orphysicalstandbydatabase
Foradditionalinformation,pleasevisitthefollowingURL:http://docs.oracle.com/database/122/DGBKR/using-data-guard-broker-to-manage-switchovers-failovers.htm#DGBKR394
Simplified Observer Management
WithasingleDGMGRLbrokersession,wecannowmonitorandmanagemultipleObserversfromfast-startfailoverconfigurations.ThisincreasestheoperationalefficienciesandthusreducescostofmanagingmultipleDataGuarddatabasesthathavefast-startfailoverconfigurations.
Multiple Instance Redo Apply (MIRA) in RAC
StartinginOracle12.2,wecanrunRedoApplyalloronsomestandbyinstances.Withthisconceptofmultipleinstanceredoapply(MIRA),RedoApplyperformancecanscaleaswideasthetargetRACconfigurationallows.ThisfeatureiscrucialforExadataandRACcustomerswithdemandinghighworkloadsontheprimarydatabase.ForActiveDataGuardcustomers,theycanhavereal-timeaccesstothedatabeingchurnedontheprimarydatabase.TheALTERDATABASERECOVERMANAGEDSTANDBYDATABASEcommandnowacceptsanewINSTANCES[ALL|integer]clausetostartRedoApplyonmultipleinstances.TheALLoptionstartsredoapplyonalltheRACstandbyinstancesthatareinopenormountmode.Alltheinstancesmustbeinthesamemountedoropenmode.Oneinstancecannotbeinopenmode(ActiveDataGuardorread-onlymode)whileothersareinmountedmode.TheintegeroptionspecifiesthenumberofRACstandbyinstancesthatwillperformredoapply.WecannotspecifywhichRACinstance(s)willperformtheredoapply.Startingredoapplyonmultipleinstanceshasthefollowingrestrictions:
• In-Memorycolumnstoreisnotsupported• BlockChangetracking(BCT)isnotsupported.
RedostreamisshippedtomultipleRACstandbyinstances,redoapplyperformanceisdirectlycorrelatedtonetworkbandwidthandlatencybetweentheprimaryandstandbydatabaseenvironments.WiththeDGMGRLcommandlineinterface,wecanconfigurewhichRACinstancesinthephysicalstandbyenvironmentapplyprocessesshouldbeexecutedtousethenewOracleActiveDataGuardmultipleinstanceRedoApplyfeature.
Subset Standbys
WhentheMulti-tenantoptionwasintroducedinOracleDatabase12cRelease1(12.1),thephysicalstandbywasatthecontainerlevelandallpluggabledatabases(PDBs)hadtoparticipateinthephysicalstandbyconfiguration.AsofOracleDatabase12cRelease2,OracleaddedanewfeaturetoallownumberofPDBstobereplicatedtothephysicalstandbyCDBdatabase.Priortothisrelease,theENABLED_PDBS_ON_STANDBYinitializationparameteronlysupportedtwovalues:allPDBsornone.Now,wecanprovidealistofPDBstotheENABLED_PDBS_ON_STANDBYinitializationparameter.TheENABLED_PDBS_ON_STANDBYparameterisonlyapplicableonthephysicalstandbydatabase.Ifthisparameterissetontheprimarydatabases,itisignoredduringthestartupofthedatabase.Ifyouusethisinitializationparameter,werecommendthatyoualsosetthisparameterontheprimarydatabaseincaseyouperformaswitchoverorafailoverandyourprimaryonedaybecomesyourstandbydatabase.Intheabsenceofthisparameter,allPDBsintheCDBarecreatedonthestandbydatabase.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
TheENABLED_PDBS_ON_STANDBYparametercanacceptalistofPDBnamesoraglobpatternsuchas“VNAPDB?”or“VNAPDB*a”,“VNAPDB2”.GlobpatternrulesaresimilartoregularexpressionrulesincommonUNIXshells.Thecommonexpressionssuchasasterisk(*)andquestionmark(?)wildcardcharactersaresupported.Thequestionmark(?)representsasingleunknowncharacter;theasterisk(*)representsmatchestoanynumberofunknowncharacters.Thisparameteralsoacceptsaminussign(-)whichcanbeusedasthefirstcharacterinaPDBnametodesignatethatthePDBshouldbeexcludedonthestandbydatabase.PDBnamesandrulesassociatedwiththePDBsshouldbeenclosedwithdoublequotationmarks.OraclewillremovethedoublequotationmarkbeforeprocessingthePDBlist.Hereareseveralexamplesofthisparameterusage:
• ENABLED_PDBS_ON_STANDBY=“*”meansthatallPDBswillbecreatedonphysicalstandby.• ENABLED_PDBS_ON_STANDBY=“VNAPDB1*”meansthatVNAPDB1A,VNAPDB1B,andVNAPDB1Cwillbecreatedonthe
physicalstandby.• ENABLED_PDBS_ON_STANDBY=“VNAPDB*A”meansthatVNAPDB1A,VNAPDB2A,andVNAPDB3Awillbecreatedon
physicalstandby.• ENABLED_PDBS_ON_STANDBY=“VNAPDB1*”,“-VNAPDB*A”meansthatVNAPDB1BandVNAPDB1Cwillbecreatedon
physicalstandbybutVNAPDB1Awillbeexcluded
IntheCREATEPLUGGABLEDATABASE…STANDBYS=statement,anewoptionisintroducedinOracle12.2.WehaveanEXCEPTclausetodesignatewhichCDBwedonotwantthisPDBtobeexcludedfrom.InOracle12.1,theCREATEPLUGGABLEDATABASE…STANDBYS=accepted:
• alistofCDBsthatyouwantthisPDBtoreplicateto:{('CDB1','CDB2',...)• NONE• ALL
Now,theALLoptionisenhancedtospecifyexclusionofCDBs:ALL[EXCEPT('MYCDB','YOURCDB',...)
Data Guard Database Compare
RapidHomeProvisioningenablesyoutocreateclusters,provision,patch,andupgradeOracleGridInfrastructureandOracleAnewPL/SQLprocedure,calledDBMS_DBCOMP.DBCOMP,isintroducedtodetectlostwritesandtoidentifyinconsistenciesbetweentheprimaryandphysicalstandbydatabase.Thissuppliedprocedurecomparesthematchingdatablocksontheprimaryandphysicalstandbydatabases.ThecoolestthingaboutthisparameteristhatitdoesnotrequiretheDB_LOST_WRITE_PROTECTparameterbeset.Thisprocedurecanbeexecutedatanytime,andyoucanmonitortheprogressbyqueryingtheV$SESSION_LONGOPSview.Thedbverifyutilitycannotdetectforlostwritediskerrors.TheDBAwouldleveragethisproceduretodetectforsilentcorruptionsintroducedbythestoragearrayatthephysicalstandbydatabase.Oraclealreadyvalidatesondatabeingreadorchangedonboththeprimaryorstandbydatabase.Thisstoredprocedurecanprovidecomprehensivevalidationoftheentiredatabaseincludingdormantdata.TheDBCOMPprocedurecanbeexecutedontheprimaryoronthephysicalstandbywiththedatabaseinMOUNTorOPENmode.Thisprocedureacceptsthreeparameters:DBMS_DBCOMP.DBCOMP ( datafile IN varchar2, outputfile IN varchar2, block_dump IN boolean); Thedatafilecanbeanumber,nameofthedatafileorALLforallthedatafiles.Theoutputfileisaprefixinthenameoftheoutputfile.Alloutputisstoredinthe$ORACLE_HOME/dbsdirectoryandcanbemodifiedwitheitherrelativeorabsolutepath.TheblockdumpparameterisaBooleanparameter.Bydefault,thisparameterisFALSE.WecansetthisBooleanparametertoTRUEifwewantthecontentoftheblocktobedumpedintotheoutputfilewhenapairofblocksbetweentheprimaryandstandbydatabasesisnotthesame.Here’sasamplecodeexampleoftheDBCOMPprocedure:
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
DECLARE DataFile VARCHAR2(1000); OutputFile VARCHAR2(1000); BEGIN DataFile := 'all' ; OutputFile:='BlockCompareFULL_'; SYS.DBMS_COMP.DBCOMP(DataFile, OutputFile, true); END; / TheDataGuardBrokerinenhancedtotakeadvantageofthisfeaturetoo.ThenewcommandVALIDATEDATABASEDATAFILEprovidethesamefeatureastheDBCOMPprocedure.JustliketheDBCOMPprocedure,wecanvalidatethedatabaseatthedatafileleveloratthedatabaselevel.Here’soptionsfortheVALIDATEDATABASEDATAFILEcommandwiththeDataGuardBroker:VALIDATE DATABASE [database-name | ALL] DATAFILE [datafile-name | datafile-number | ALL] OUTPUT="output-file-name"; Theoutputfileisgeneratedinthetracedirectory.SimilartotheDBCOMPprocedure,wecanspecifythedatafilenameorthedatafilenumberortheALLoptionforallthedatabasefiles.Hereisanusageexample:DGMGRL> VALIDATE DATABASE prod DATAFILE ALL OUTPUT=BlockCompareFULL_prod.out;
Automatic Password File Synchronization
EffectiveOracle12.2,whenthepasswordforSYS,SYSDBA,SYSOPERand/orSYSDGaremodified,thepasswordfileisupdatedontheprimarydatabase.ThechangesmadeonthepasswordfileisreplicatedtothepasswordfilestoallthedatabaseORACLE_HOMEontheDataGuardconfiguration.Thepasswordfileisupdatedonthephysicalstandbydatabaseserverwhenredoisapplied.Forfarsyncconfigurations,thechangestothepasswordfilemustbemanuallycopied.Thisisbecauseafarsyncserverreceivesredoinformation,butdoesnotapplyredo.Whenthepasswordfileisupdatedonthefarsyncserver,thepasswordwillautomaticallybepropagatedtothetargetphysicalstandbydatabaseservers.
In-Memory Support for ADG
StartinginOracleDatabase12cRelease2,theIn-Memory(IM)ColumnStoreissupportedonthestandbydatabaseifyouarerunningActiveDataGuard.TheIMoptioncanbeconfiguredontheprimarydatabase,onlyonanADGstandbydatabase,oronboththeprimaryandtheADGstandbydatabases.OntheActiveDataGuardenvironment,theINMEMORY_ADG_ENABLEDparameterneedstobeenabledinadditiontothein-memorycachesize.Bydefault,theINMEMORY_ADG_ENABLEDparameterissettotrue.Thisparameterisonlyapplicableonthestandbydatabases.ForRACconfiguration,thisparametermustbesettothesamevalueacrossalltheRACinstances.Theparameterhasnorelevanceonaprimarydatabase.
Minimize Impact to Primary Databases with Multiple Sync Standby Databases
OracleintroducesanewinitializationparametercalledDATA_GUARD_SYNC_LATENCYwhichallowsyoutospecifyhowlongtheprimarydatabaseLogWriter(LGWR)shouldwaitforaresponse,frommultiplesynchronousstandbydatabasesduringredotransport.Thedefaultvalueof0specifiesthattheLGWRprocesswillwaituntilthenumberofsecondsspecifiedbytheNET_TIMEOUTattributeoftheLOG_ARCHIVE_DEST_Nparameter.TheNET_TIMEOUTredotransportattributespecifiesthedurationinsecondsforhowlongtheprimarydatabaseneedstowaitforaresponsefromeachofthestandbydatabaseinSYNCredotransport.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
PriortoOracle12.2,withmultiplesynchronousstandbydatabases,theprimarydatabasemustwaitforallsynchronousstandbydatabasestoacknowledgereceiptoftheredoorexceedtheirindividualNET_TIMEOUTperiodbeforecontinuing.ThisDATA_GUARD_SYNC_LATENCYparameterdefinesthenumberofsecondsthattheprimarydatabasemustwait,onceoneofthesynchronousstandbydatabasesacknowledgesreceiptsoftheredo.Othersynchronousdatabasedestinationsmustreturnreceiptwithinthisthresholdorbecomedisconnectedfromtheprimarydatabase.Here'sanexamplewithfoursynchronousstandbydestinationsandtheDATA_GUARD_SYNC_LATENCYparameterissetto2(2seconds).Ifthefirststandbydatabaseacknowledgesredoreceiptimmediately,theremainingthreestandbydatabaseshaveupto2secondstorespondwithacknowledgementofredoreceipt.TheprimarydatabasewillnotwaitmorethanthespecifiedthresholdspecifiedintheDATA_GUARD_SYNC_LATENCYparameter.Ifoneormoreoftheremainingsynchronousphysicalstandbyconfigurationfailtoacknowledgeredoreceipt,theLGWRwilldisconnectfromthestandbydatabaseandputthedestinationinerrorstate.TheprimarydatabasestilloperatesinzerodatalossMaximumProtectionmode,sinceoneofthesynchronousstandbydatabaseshasacknowledgedreceiptofredo.OncethedurationoftheREOPENattributesecondshaveelapsed,LGWRwillreconnecttothefailedsynchronousstandbydatabases.YoucannotsetthevalueofDATA_GUARD_SYNC_LATENCYtobegreaterthanthevalueofNET_TIMEOUT.LGWRwillnotwaitlongerthanthevalueofNET_TIMEOUTattributeoftheLOG_ARCHIVE_DEST_nparameter.
Broker Support for Multiple Automatic Failover Targets
StartinginOracle12.2,wehavethecapabilitytoconfiguremultiplefailovertargetsinafast-startfailoverconfiguration.Wecandesignateoneormorefailovertargetstoachieveahigherlevelofsuccessforautomaticfailoverwhentheneedarises.ItisalsopossibletosetoneormoreDB_UNIQUE_NAMEtotheDataGuardBroker,FastStartFailoverTargetproperty.Thelistoftargetstandbydatabasesarecalledcandidatefast-startfailovertargets.Thesecandidatefast-startfailovertargetscannotbeafarsyncinstance,asnapshotstandbydatabase,oraZDLRA.TheFastStartFailoverTargetpropertycanbesettothelistofDB_UNIQUE_NAME,andthebrokerwillattemptfailoverintheordertheyarelisted.IfthepropertyissettothekeywordANY,thenthebrokercanselectanyofthecandidatetargetsasthecurrentfast-startfailovertarget.InordertochangetheFastStartFailoverTargetpropertyforthecandidatefast-startfailovertargets,wemustdisablefast-startfailover,modifytheFastStartFailoverTargetproperty,andre-enablefast-startfailover.
Broker Support for Redo Transport Destinations of Different Endianess with ZDLRA
WiththeZDLRAinplay,OracleDataGuardbrokercanmanagearemoteredodestinationthathasadifferentendianessthantheprimarydatabase.Forexample,thisallowstheOracleDataGuardbrokertomanageandconfigureOracleDataGuardtransportservicesonLinux(oronExadataorevenonOracleDatabaseCloud)whentheprimarydatabaseresidesontheAIXoperatingsystem.ImaginethecapabilitiesofcrossplatformmigrationswiththeZDLRAandtheabilitytosynchronizedatabasesofheterogeneousconfigurationswithdifferentendianness.ThisfeaturewillsignificantlyimprovetheflexibilityofmigratingdatabasesfromoneplatformtoanotherwiththeZDLRA.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Coming Soon 12 Days of Data Guard 12.2 New Features 2017
Active Data Guard Standby Connection Preservation During Role Changes Comingsoon
No Logging Changes for Data Guard Comingsoon
Data Guard Broker PDB Migration or Failover Comingsoon
Enhancement for Alternate Destinations Comingsoon
Broker ConfigurationWideServiceName Configuration Property Comingsoon
Oracle Data Guard Broker Support for Executing DGMGRL Command Scripts Comingsoon
Fast-Start Failover in Maximum Protection Mode Comingsoon
Distributed Operations on CLOB, BLOB and XMLType Comingsoon
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Third Day of 12.2, my DBA gave to me… Partitioning
December14,2016
Technology Overview
Database:12c12.2
Company:OracleCorporation
Technology:Partitioning
Viscosity can help with any of your 12.2 needs
Viscosityhasperformed
numerouszero-downtime
databasemigrationsand
upgradesovertheyearsandhas
aproventrackrecordwith
businesscriticalandmission
criticaldatabases.
Viscosity’sDatabaseMigration
&UpgradeServicescanplan,
upgrade,validateandmigrate
alldatabasecontent-quickly
andeffectivelywithour
automatedapproachand
provenmethodology.
Learnmoreabouthowyoucan
maintainandmaximizeyour
investmentsatviscosityna.com.
Formoreinformation,emailus
Withmorethan500newfeaturesintheOracleDatabase12.2,OracledeliversnewfunctionalityandfeaturesthatcustomershadbeenaskingforonCloudComputing,BigData,andSecurityfortheirdatabaseplatform.Oneofthemajorenhancements,istheVeryLargeDatabase(VLDB)ondatabasepartitioning.BelowarethecommonlyusedfeatureswithOracledatabasepartitioningandthelistofallOracleDatabase12.2.
Convert Non-Partitioned Table to a Partitioned Table
StartingwithOracleDatabase12.2,youcannowconvertanon-partitionedtabletoapartitionedtableonline.Tomakethischange,usetheALTERTABLEwithMODIFYclauseandONLINEkeywordtoenableparallel/concurrentDMLfortheconversion.Indexesarealsomaintainedandcanbeconvertedtopartitionsaspartoftheprocess.Duringtheconversationprocess,allDMLtransactionscontinueasnormal.ForVLDBdatabasecustomerswhowanttoadoptapartitioningstrategy,theycanconverttopartitionedtableswithoutanydowntime.
ALTERTABLEmytableMODIFYPARTITIONBYRANGE(tab_id)INTERVAL(25)(PARTITIONp1VALUESLESSTHAN(100),PARTITIONp2VALUESLESSTHAN(1000))ONLINEUPDATEINDEXES(IDX1_tab_idLOCAL(PARTITIONip1VALUESLESSTHAN(MAXVALUE)));
Read-Only Partitions
Now,wecansetpartitionsandsub-partitionstoread-onlyforhistoricalprotectionofunintentionalDML.YoucanleveragetheCREATETABLEandALTERTABLEwiththeread-onlyclause.Bymakingthepartition/subpartitionread-only,allDMLoperationswillbedisabled.
CREATETABLEmytable(
tab_idNUMBER(10)NOTNULL,tab_descVARCHAR2(20))READWRITE
PARTITIONBYRANGE(tab_id)(PARTITIONmytable_p1VALUESLESSTHAN(100),PARTITIONmytable_p2VALUESLESSTHAN(1000)READONLY));
Multi-Column List Partition
Oracle’senhancedlistpartitioningfunctionalityallowsmultiplekeycolumns.Allowingpartitioncriteriaforlistpartitionedtablestobemultiplecolumns,extendsyourapplicationfunctionality.Youcanonlyhaveone DEFAULT partitionforamulti-columnlist-partitionedtable.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
CREATETABLEmytable(tab_idNUMBER(10)NOTNULL,tab_descVARCHAR2(20),tab_codeVARCHAR2(2),tab_channelNUMBER(2))
PARTITIONBYLIST(tab_code,tab_channel)(PARTITIONmytable_p1VALUES((‘AB’,10),(‘AC’,20)),PARTITIONmytable_p2VALUES(DEFAULT)
); CREATETABLEmytable(
tab_idNUMBER(10)NOTNULL,tab_descVARCHAR2(20),tab_codeVARCHAR2(2),tab_channelNUMBER(2))
PARTITIONBYLIST(tab_code,tab_channel)(PARTITIONmytable_p1VALUES((‘AB’,10),(‘AC’,20)),PARTITIONmytable_p2VALUES(DEFAULT)
);
Split Partition with Online Maintenance
Forregulartables,youcanusetheALTERTABLEandALTERINDEXwiththeSPLITPARTITIONclausetoredistributethecontentsofapartitiononline,intotwonewpartitions.Thisfunctioncanbeused,whenapartitionbecomesverylargeandcouldcauseperformancesuchasRMANbackupsormaintenanceoperations.Youcanexercisethisoptionforhashpartitionsorsubpartitions.
ALTERTABLEmytableSPLITPARTITIONp1at(100)INTO(PARTITIONp1_1,PARTITIONp1_2);
Create a Partitioned External Table
OracleDatabase12.2providestheabilitytocreateanexternaltableasapartition.Filesforthepartitionedexternaltablecanbeonfilesystems,ApacheHivestorageorinaHadoopDistributedFileSystem(HDFS).WecanextendOraclefunctionalitybymappingpartitionedHivetablesintoanOracleDatabaseorpartitioningontopofHadoopDistributedFileSystem(HDFS).HDFS-baseddatastoresenablefasterqueryperformanceandenhanceddatamaintenance.CREATETABLEmyexttable(tab_id,tab_desc,tab_code,tab_channel) ORGANIZATIONEXTERNAL (TYPEoracle_loader
PARTITIONBYLIST(tab_code,tab_channel)(PARTITIONmytable_p1VALUES((‘AB’,10),(‘AC’,20)),PARTITIONmytable_p2VALUES(DEFAULT));
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Additional Oracle 12.2 Partitioning Features
• AutomaticListPartitioningTheautomaticlistpartitioningmethodenableslistpartitioncreationondemand.
• DeferredSegmentCreationforAutomaticListPartitionsandIntervalSubpartitionsSavingdiskspacewhenpartitionandsubpartitioncreationisinthepresenceofdata.
• CreatingaTableforExchangewithaPartitionedTableTablescanbecreatedwithFOREXCHANGEWITHclause,toexactlymatchthedefinitionofthepartitionedtableforpartitionexchangecommand.
• FilteredPartitionMaintenanceOperationsPartitionmaintenanceoperationscansupportdatafilteringusingINCLUDINGROWSWHEREclause.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Fourth Day of 12.2, my DBA gave to me… ASM New Features
December15,2016
Thefollowingarticlewilldescribeatahigh-levelthekeyASMimprovementsinOracle12.2.Note,duetothenumberofchangesandimprovementsinACFS,wecoverACFSinaseparatearticle.
Technology Overview
Database:12c12.2
Company:OracleCorporation
Technology:ASM
Viscosity can help with any of your 12.2 needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
Oracle ASM Flex Disk Groups and File Groups
Inpreviousreleases,diskgroupstorageattributesweredefinedonlyatthediskgrouplevel,whichwasgenerallyquitecoarsefromastoragemanagementperspective.In12.2,theconceptofASMflexdiskgroupisintroducedtoenableuserstomanagestorageatthedatabaselevel,allowinggreatergranularityofcontrol.Note,thiscapabilityiscomplimentarytotheexistingdiskgroupmanageability.FlexgroupsarebuiltontheconceptofFilegroups.Filegroups,areagroupoffilesthatsharethesamesetofpropertiesandcharacteristicsandareusedtodescribedatabasefiles.Asignificantbenefitoffilegroupsisthecapabilitytohaveadifferentavailabilityspecificationforeachdatabase;akeyexampleiscapabilitytocreatepoint-in-timedatabaseclones.
Thefollowingexampleillustrateshowflexdiskgroupiscreated.
SQL> create diskgroup vna_data flex redundancy disk ‘/dev/mapper/mpath*’
OrConvertexistingstandarddiskgrouptoflexdiskgroup.
SQL> alter diskgroup vna_data convert redundancy to flex;
EachdatabasethatisbuiltonASM(thathascompatible.asmandcompatible.rdbmsissetto12.2.0.0)willconsistoffilegroup,whichallowsgranularstoragemanagementcapabilities,suchasredundancy,rebalancepowerlimitsandpriority,stripingandquotagroups;i.e.,atthefilegrouplevel.Sincetheredundancyisnowatthefilegrouplevel,andnotatthediskgrouplevel,youcanconvertandchangetheredundancyofdatabasefromnormaltohigh.Note,thatyoucannotcurrentlychangefromexternaltohigh/normal.
Diskgroupcancontainmultiplefilegroups,eachwithitsindependentFlexredundancy.Afilegroupcanbelongtoonlyonediskgroup;however,adatabasecanspanmultiplediskgroupswithmultiplefilegroupsindifferentdiskgroups.
ASM Support for Preferred Read on Extended Clusters
Inpreviousreleasesthe ASM_PREFERRED_READ_FAILURE_GROUPS definedreadpreferencetoaspecificfailuregroupinextendedclusters.
InASM12.2,thepreferredreadfailuregroupscapabilityisnowautomaticallydetectedandsetintheASMinstancewhenextendedclustersaredeployed.TheASMinstancewillevaluatewhichdisksarelocaltothatinstanceandsetpreferenceaccordingly.Thusthe ASM_PREFFERED_READ parameterisnolongernecessary.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Oracle IOServer
In12.2,OracleextendsthecapabilityofFlexASMbyenablingtheASMinstancetobedisjointedandseparatefromthephysicalservershostingdatabases.ThisfeatureisreferredtoasASMIOServer(IOS).This“farcluster”capability,enablesthedeploymentoflargerclustersofASMinstancesthatcansupportmoredatabaseclientswhilereducingtheASMinstancefootprint,thusstorageconsolidationoccursbyplacinglargernumberdatabaseintoasinglesetofdiskgroups.
WiththeintroductionofIOS,ASM,anddatabasestorageaccesscanbeconfiguredinthefollowingconfigurations:
• DirectaccesstoASMdiskswithlocalclients(sameaspre-12.2)• FlexASMclientswithdirectaccesstoASMdisks• ACFSaccessthroughtheASMproxyinstance• Remote-NetworkbasedconnectivitytoASMdiskgroupswithOracleIOServer(IOS)
Updates for Oracle ASM Filter Driver Installation and Configuration
Oracle12.1,introducedASMfilterdriver(ASMFD)forimproveddevicemanagementanddiskgroupprotection.However,theinstallationrequiresupfrontenablementbeforeGridInfrastructure.In12.2,theinstallationandconfigurationforASMFilterDriver(ASMFD)isnowstreamlinedandenabledaspartoftheOracleGridInfrastructureinstallation.
ASM Extended Support for 4K Sector Size
Thefullsupportfor4Ksectorsizeshasbeenloomingsince11.2.Nowin12.2ASM,anewdiskgroupattribute,logical_sector_size,willdefinethelogicalsectorsize(inbytes)ofthediskgroupandspecifiesthesmallestI/OthatcanbeissuedtotheunderlyingASMdisks.
Deprecated Features
DeprecationofOracleASMIntelligentDataPlacement
DeprecationofASM_PREFERRED_READ_FAILURE_GROUPSInitializationParameter
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Fifth Day of 12.2, my DBA gave to me… SQL Performance Tuning New Features
December16,2016
Technology Overview
Database:12c12.2
Company:OracleCorporation
Technology:SQLPerformance
Tuning
Viscosity can help with any of your 12.2 needs
Viscosityhasperformed
numerouszero-downtime
databasemigrationsand
upgradesovertheyearsandhas
aproventrackrecordwith
businesscriticalandmission
criticaldatabases.
Viscosity’sDatabaseMigration
&UpgradeServicescanplan,
upgrade,validateandmigrate
alldatabasecontent-quickly
andeffectivelywithour
automatedapproachand
provenmethodology.
Learnmoreabouthowyoucan
maintainandmaximizeyour
investmentsatviscosityna.com.
Formoreinformation,emailus
AWR at PDB Level
AutomaticworkloadrepositoryreportscannowbegeneratedatPDB level.This featurewillhelp a lot in narrowing down performance issues in a very active 12c multi-tenantenvironment,whichhasmultiplePDBS.In12.1,theAWRreportscouldbecreatedonlyatCDBlevel, and itwas quiet cumbersome towork through themwhen trying to resolve an issuewithaparticularPDB.
Thisfeatureisnotenabledbydefaultandisrecommendedtobeusedonlywhendebugging.ThesnapshotintervalandretentioncanbecontrolledatPDBlevel.
Tosupporttheabovefeature,newviews,AWR_ROOT%andAWR_PDB%arenowintroducedtocheckAWRinformation,atbothROOT(container)andPDBlevelrespectively.
AWR for Active Data Guard
Oracle12.2,comeswithanenhancedAWRframeworktosupportcaptureofAWRsnapshotsonActiveDataGuarddatabases.Theprimarydatabaseoranyotherremotedatabase,(canbetermed as AWR-catalog database), can host the snapshots repository. AWR tables on thecatalogdatabasegatherinformationonthesnapshotofADGdatabase,usingdatabaselinks.
Thesnapshotscanbetakenmanuallyorautomated.
Optimizer Statistics Advisor
AnothergreattoolforaDBA,istheOptimizerStatisticsAdvisor.Oftenitwasfoundthatstatisticswerestaleinthedatabasesandnotcollectedbythenightlyautostatsjob,duetoashortmaintenancewindoworresourcecontentions.ThenewOptimizerStatisticsAdvisorjob,(AUTO_STATS_ADVISOR_TASK)willhelpindiagnosingproblemswiththeexistingstatsgatheringpractices.Likeotheradvisors,itwouldrunthroughthesamemaintenancewindowandrecommendchanges.Itcanalsoberunmanually.Thereportsgeneratedbythisjobareauser-friendlyformat,similartoADDMreports.
Per-Process PGA Limits
Oracle12.2comeswiththeabilityofrestrictingthePGAusageatsessionlevel,inaparticularconsumergroup.ThiscanbeenabledbydefiningaplandirectiveusingtheOracleDatabaseResourceManager.Thisbenefitsadministratorsusingconsumergroupsforcontrollingresourceutilization,byaparticularuserinaconsumergroup.Youcansetthisabsolutelimitwiththeparameter SESSION_PGA_LIMIT andthe DBMS_RESOUCE_MANAGER.CREATE_PLAN_DIRECTIVE procedureoftheOracleDatabaseResourceManager.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Index Monitoring
Oracle 12.2 has indexmonitoring turned on by default. It tracks the usage at execution level rather than parse level. The viewV$INDEX_USAGE_INFOkeepstrackofthe indexusagesincethe last flushandtheDBA_INDEX_USAGEshowsthehistoricallytrackedinformation.DBA_INDEX_USAGEstoresthetimewhentheindexwasusedlast,thetotalnumberoftimestheindexhasbeenaccessed,andmuchmore.
Adaptive Plans
Inthelatestupdate,OraclemadetheOptimizer_Adaptive_Featuresparameterobsolete.Theplanadaptivefeatures,arenowcontrolledbytwonewparameters:Optimizer_Adaptive_PlansandOptimizer_Adaptive_Statistics.TheOptimizer_Adaptive_PlansparametercontrolswhethertheoptimizercreatesadaptiveplansanddefaultstoTRUE.TheOptimizer_Adaptive_StatisticsparametercontrolswhethertheoptimizerusesadaptivestatisticsanddefaultstoFALSE.TheOptimizer_Adaptive_Statisticsisaninfluentialparameter,whichincludesgenerationsofSQLplandirectives,dynamicsampling,automaticre-optimization,andmanyothers.ThecombinationofthesetwoparametersrequiressomeDBAinvolvement,butwillprovideaDBAthechancetoreviewtherecommendationsandhelpinachievingstableSQLexecutionplans.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Sixth Day of 12.2, my DBA gave to me… ACFS New Features
December17,2016
Technology Overview
Database:12c12.2
Database:12c12.2
Company:OracleCorporation
Technology:ASMACFS
Viscosity can help with any of your 12.2 needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
OracleAutomaticStorageManagementClusterFileSystem(ACFS)madeit’sdebutwithOracle11.2.ManyDBAsarenotawareofthevastfeaturesthatareavailablewithACFS.WitheachreleaseandupdatetoOracle,significantenhancementshavebeenmade.WithOracleDatabase12cRelease2,newfeature/functionalitywasmadetoACFS.Snapshot EnhancementsInOracle12.2,OracleextendsACFSsnapshotfunctionalityandfurthersimplifiesfilesystemsnapshotoperations.Thefollowingareafewofthekeynewfeatureswithsnapshots:Adminscannow,ifneeded,imposequotastosnapshotstolimitamountofwriteoperationsthatcanbedoneonasnapshot.Quotascanbesetonthesnapshotlevel.OraclealsoprovidesthecapabilitytorenameanexistingACFSsnapshot,toallowmoreuser-friendlynames.Whenwedeleteasnapshotwiththe“acfsutilsnapdeletesnapshotmount_point”command,wecanforceadelete,evenifthereareopenfiles.Thereareseveralnewcapabilitieswithsnapshotre-masteringandduplication.ThenewACFSsnapshotremastercapabilityallowsforasnapshotinthesnapshotregistrytobecometheprimaryfilesystem.ACFSsnapshotduplicationfeaturesareintroduced.Withthe“acfsutilsnapduplicatecreate”command,canbeusedtoduplicateasnapshotfromanexistingsnapshot,toastandbytargetfilesystem.The“apply”optiontothe“acfsutilsnapduplicate”command,allowsustoapplydeltastothetargetACFSfilesystemorsnapshot.Ifthisistheinitialapply,thetargetfilesystemmustbeempty.Ifthetargethadbeenappliedbefore,thentheapplyprocessbecomesanincrementalupdate.Beforetheincrementalupdateoccurs,thecontentsofthetargetfilesystemmustmatchthecontentoftheoldersnapshot,sincethelastincrementalupdate.Also,thecontentsofthetargetsnapshotcannotbemodifiedwhiletheapplyishappening.Additionally,ACFSsnapshot-basedreplicationnowusesSSHprotocolstotransmitdatastreams.
4k Sectors and Metadata
WhenAdminscreateanACFSfilesystem,theyhavetheoptiontocreatethefilesystemwiththe4096-bytemetadatastructure.Whenissuingthemkfscommand,youcanspecifythemetadatablocksizewiththe–ioption;twovalidoptionsare512bytesor4096bytes.The4096-bytemetadatastructureismadeupofmultiple512-bytelogicalsectors.IftheCOMPATIBLE.ADVMASMDiskgroupattributeissetto12.2orgreater,thenthemetadatablockis4096bytesbydefault.IfCOMPATIBLE.ADVMattributeissettolessthan12.2,thentheblocksizeissetto512bytes.WhentheADVMvolumeoftheACFSfilesystemissetwith4Klogicaldisksectorsize,DirectI/Orequestsshouldbealignedonthe4Koffsetandbeamultipleof4ksizeforoptimalperformance.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Defragger
Veryrarelywouldyouneedthedefragmentationtool,duetothefactthatACFSalgorithmisforallocationandcoalesce-mentoffreespace.However,forthoseraresituations,whenwecangetintofragmentedsituationsunderheavyworkloadsorforcompressedfiles,Oracleprovidesthedefragoptiontotheacfsutilcommand.Now,wecanissue“acfsutildefragdir”or“acfsutildefragfile”commandsforon-demanddefragmentation.ACFSwillperformalldefragoperationsinthebackground.Withthe–roptionofthe“acfsutildefragdir”command,youcanrecursivelydefragsubdirectories.
Compression Enhancements
ACFScompressioncansignificantlyreducediskstoragerequirementsforcustomersrunningdatabasesonACFS.DatabasesrunningonACFS,mustbeofversions11.2.0.4orhigher.ACFScompressioncanbeenabledforspecificACFSfilesystemsfordatabasefiles,RMANbackupfiles,archivelogs,datapumpextractfiles,andgeneralpurposefiles.Oracledoesnotsupportredolog/flashbacklogs/controlfilecompression.WhenenablingACFScompressionforafilesystem,onlynewincomingfileswillbecompressed.Allexistingfilesonthefilesystemwillremainun-compressed.Likewise,ifyoudecidetouncompressafilesystem,Oraclewillnotde-compressfiles.Oraclewillsimplydisablecompressionfornewlycreatedfiles.TocompressanduncompressACFSfilesystems,executetheacfsutilcompressonoracfsutilcompressoffcommands.Toviewcompressionstateandspaceconsumptioninformation,youcanexecutethe“acfsutilcompressinfo”command.Thecommands“acfsutilinfofs”and“acfsutilinfofile”nowsupportACFScompressionstatus.Atthistime,databaseswith2Kor4KblocksizesarenotsupportedforACFScompression.ACFScompressionissupportedonLinuxandAIX.ACFSisalsosupportedtoworkwithACFSsnapshot-basedreplication.
Loopback Devices
ACFSnowsupportsloopbackdevicesontheLinuxoperatingsystem.WithACFSloopbackdevicesupport,wecannowtakeOVMimages,templates,andvirtualdisksandpresentthemasablockdevice.Filescanbesparseornon-sparse.ACFSalsosupportsDirectI/Oonsparseimages.
Metadata Collector
Themetadatacollector,copiesmetadatastructuresfromanOracleACFSfilesystemtoaseparateoutputfilethatcanbeingestedforanalysisanddiagnostics.Themetadatacollectorreadsthecontentsofthefilesystemandallmetadataiswrittenouttoaspecifiedoutputfile.ThemetadatacollectorcanreadtheACFSfilesystemonlinewithoutrequiringanoutage.Note,thistoolisnotareplacementforthefilesystemcheckercommand(fsck),butasupplementforadditionaldiagnosisandsupport.Eventhoughthemetadatacollectorcanreadthefilesystemwhileitisonline,forbestresults,unmountthefilesystempriortometadatacollection.Thesizeoftheoutputfile,isdirectlycorrelatedtothesizeofthefilesystemthatthecollectionisspecifiedfor.Tocollectmetadataforafilesystem,invokethe“acfsutilmeta”command.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Auto-Resize Enhancements
Theauto-resizefeature,allowsusto“autoextend”afilesystemifthesizeofthefilesystemisabouttorunoutofspace.JustlikeanOracledatafilethathastheautoextendoptionenabled,wecannow“autoextend”theACFSfilesystemtothesizeoftheincrementbyoption.Withthe–aoptiontothe“acfsutilsize”command,wecanspecifytheincrementbysize.WecanalsospecifythemaximumsizeorquotafortheACFSfilesystemto“autoextend”toguardagainstarunawayspaceconsumption.TosetthemaximumsizeforanACFSfilesystem,executethe“acfsutilsize”commandwiththe–xoption.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Seventh Day of 12.2, my DBA gave to me… Security New Features
December18,2016
Technology Overview
Database:12c12.2
Database:12c(12.2)
Company:OracleCorporation
Technology:Security
Viscosity can help with any of your 12.2 needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
EncryptionWithOracleDatabase12cRelease2,encryptionofatablespacecanbedeployedwithzerodowntime.Theencryptionprocesscanbeexecutedinthebackground,sothatthetablespacecanbeavailableforDMLaccess.Basically,youcanencrypt,decrypt,andrekeyatablespaceusingTransparentDataEncryption(TDE)inliveconversion.However,youcannotencrypt,decryptorrekeyatemporarytablespaceonline.Thisprocesswillhelpwithrotationofdataencryptionkeys,withTDEinthebackground.Online Encrypt Tablespace Toencryptanexistingtablespaceonline,youmustlogintothedatabasewiththeSYSKMrole.ToencrypttheSYSTEMorSYSAUXtablespace,youmustloginwiththeSYSDBArole.IssuetheALTERTABLESPACEcommandwiththeENCRYTIONandENCRYPTclause,toencryptatablespaceonline:SQL> ALTER TABLESPACE sysaux ENCRYPTION ONLINE USING 'AES256' ENCRYPT; Tablespace altered.
IfyoudonotspecifytheUSINGclause,thedefaultencryptionwillbesettoAES128bitencryption.Fornon-OMFfiles,wemustalsospecifytheFILE_NAME_CONVERTclauseandlistoutthefilenameswiththesourcefilename,totargettheencryptedfilename.HereisanexamplefortheFILE_NAME_CONVERTclause:FILE_NAME_CONVERT=('sysaux01.dbf''sysaux01_enc.dbf').Thesecondfilename,fortheFILE_NAME_CONVERTclause,willbecometheencryptedversionofthefile;oncetheALTERTABLESPACEcommandcompletesexecution.OnlineDecryptTablespaceWithOracleDatabase12cRelease2,wecandecryptatablespaceonlinewithoutanydowntime.Todecryptatablespace,executetheALTERTABLESPACEwiththeDECRYPToption:SQL> ALTER TABLESPACE sysaux ENCRYPTION ONLINE DECRYPT; Tablespace altered.
www.viscosityna.com
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
OnlineRekeyTablespaceWecanalsorekeyatablespaceencryption.Intheexamplebelow,wearerekeyingatablespacefromAES128toAES192bitencryptionforanon-OMFmanagedfile:SQL> ALTER TABLESPACE vna_index ENCRYPTION ONLINE USING 'AES192' REKEY FILE_NAME_CONVERT = ('vna_index01_enc.dbf','vna_index01_enc192.dbf'); Tablespace altered. Intheexampleabove,wewillreplacethevna_index01_enc.dbffilewithvna_index01_enc192.dbf,inthesamedirectorywherethevna_index01.dbffilewaslocated,aftertheencryptionrekeyprocesscompletes.CompleteDatabaseEncryptionThecapabilitytoenableTDEencryptionforalltablespaces;includingSYSTEM,SYSAUX,andUNDOisnowavailable.Thisprovidescompleteencryptionofthedatabasesforregulatorycompliance.OracleextendstheirencryptionandhashingalgorithmstoincludeARIA,GOST,andSEEDEncryptionAlgorithmsforInternationalStandardsTDETablespaceOfflineConversion
OracleDatabase12cRelease2providestheabilitytoperformofflineconversionofatablespace,withoutadditionalstorageoverhead.WecanleveragecomputeacrossRAC,andmanyinstances,withparallelprocessingonmanyCPUcores.ForDataGuardconfiguration,encryptioncanbedoneonphysicalstandbyfirstandthenswitchover,whiletheprimarydatabaseisbeingencrypted.
Separation of Duty for Administering RAC Clusters 12.2RACintroducesanadministrativeprivilegecalledSYSRAC.TheintentoftheSYSRACprivileges,istoprovideonlytheminimalsetofprivilegesfortheRACadministratortoperformtheirdaytodaytasks.ThisprivilegeisusedbytheclusterwareagentandremovestheneedtouseSYSDBAprivilegeforRAC,foradministrativetasks.TheSYSRACprivilegeisforRAC,whereastheSYSDGprivilegeisforDataGuard.TheSYSRACprivilegereducestherelianceonSYSDBAonproductionRACsystems.SYSRACprivilegeisthedefaultmodeforconnectingtothedatabasebyclusterwareagent;e.g,whenexecutingRACutilitiessuchasSRVCTL. Application Security in DatabaseEnhancementtoRealApplicationSecurity(RASSession,Column,Schema,andIntegrationPrivilege),willlimituserstoexecuteprivilegedusercommands.OnlytheRASusergroupisprovidedwithaccess.PerformDMLoncolumnwillbelimitedbyRASusergroupandSELECTcanbeenforced.Forschema,theRASpolicycanbeenforcedtoeachschema,versustheentiredatabaseasbefore.Lastly,theOracleLabelSecuritycanintegratewithRASforafine-graincontrolwithusercontextandexplicitdatarealms
Enhancements to Security Manageability, Administration, and Integration
• DatabaseVaultPolicy:OracleprovidestheabilitytogroupmultipleDatabaseVaultrealmsandprotectionsintoaSinglePolicyforsimpledeploymentandintegration.OracleMultitenantwillbenefitfromthesinglepolicy.
• DatabaseVaultSimulation:Now,wehavetheabilitytotestDatabaseVaultbeforedeploymentinproduction.• PrivilegeAnalysis:WecanreviewandcompareaccessacrossPL/SQLpackagesandJavaOracleprograms.TheData
Redactionpolicycanbeanalyzedforeachdataexpressionandtransformation.
Other Improvements
• Enforcingstrongpasswordverifiers:In12.2,theentryinthesqlnet.orafileSQLNET.ALLOWED_LOGON_VERSION_SERVER,defaultsto12torequirestrongverifiersforuserlogins.
• KerberosbasedauthenticationforDirectNFS:WecanenablesecurityforDirectNFScommunicationtouseKerberosauthentication.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
• AutomaticLockofInactiveUserAccounts:WiththeINACTIVE_ACCOUNT_TIMEparameterforuserprofiles,wecanautomaticallylockOracleaccounts,iftheuserdoesnotloginwithinthespecifiednumberofdays.
• Transparentsensitivedataprotectionfordataintegration:Priorto12.2,TransparentSensitiveDataProtectionpoliciesincludedOracleDataRedactionandVirtualPrivateDatabasesecurityfeatures.With12.2,wenowhaveunifiedauditingpolicies,fine-grainedauditingpolicies,andTDEcolumnencryption.CustomerswhohavetheMulti-tenantOptionlicense,canhaveaseparatewalletpasswordforeachPDB.Withthisrelease,eachPDBcanhaveawalletwithitsowncertificatesforTransparentSensitiveDataProtectionauthentication,forneededisolationbetweenthetenantsinamulti-tenantenvironment.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Eighth Day of 12.2, my DBA gave to me… Index New Features
December19,2016
Technology Overview
Database:12c(12.2)
Company:OracleCorporation
Technology:Indexes
Viscosity can help with any of your 12.2 needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
ThefollowinglistillustratesthenewIndexfeaturesforOracleDatabase12cRelease2.Thereareseveralnewindexfeaturesthatofferimprovedperformanceandcapability.Tracking Index UsageNewindextrackinghasbeenaddedthatprovidesinformation,abouttheuseofindexesinthedatabase.TheV$INDEX_USAGE_INFOtracksindexusagesincelastflush. SQL> desc V$INDEX_USAGE_INFO Name Null? Type ----------------------------- -------- -------------------- INDEX_STATS_ENABLED NUMBER INDEX_STATS_COLLECTION_TYPE NUMBER ACTIVE_ELEM_COUNT NUMBER ALLOC_ELEM_COUNT NUMBER MAX_ELEM_COUNT NUMBER FLUSH_COUNT NUMBER TOTAL_FLUSH_DURATION NUMBER LAST_FLUSH_TIME TIMESTAMP(3) STATUS_MSG VARCHAR2(256) CON_ID NUMBER
Aflushoccursevery15minutesandisrecordedtotheV$INDEX_USAGE_INFOview.TheACTIVE_ELEM_COUNTcolumnisresetto0,whiletheLAST_FLUSH_TIMEisupdatedwiththesystemtime.TheINDEX_STATS_ENABLEDcolumnindicatesiftheindexusagestatisticsareenabledordisabled.Avalueof0,indicatesthattheindexstatisticsaredisabled;whereasavalueof1indicatesthattheindexstatisticsareenabled.TheACTIVE_ELEM_COUNT,representsthenumberofactiveindexessincethelastflush.TheFLUSH_COUNT,representsthetotalnumberofflushessincethedatabasewasbroughtonline.TheINDEX_STATS_COLLECTION_TYPEcolumn,representswhetherthetypeofcollectionwassampledorcomprehensive(ALL)statistics;thesearecollectedforeachaccessoftheindex.TheDBA_INDEX_USAGEview,holdscumulativestatisticsforeachindexinthedatabase.Usagedataincludestotalaccesscount,executionsinvolvingtheindex,andwhentheindexwaslastused.Partitioning Support for XMLIndexOracle12.2nowprovidespartitioningsupportforXMLIndex,allowingformorescalabilityduringparalleloperations.ParalyzingXMLoperations,allowsforincreasedperformancebytakingadvantageofparallelhardwareconfigurationssuchasOracleExadata.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Extensible Indexing Theextensibleindexingframework,hasbeenenhancedtosupportsystem-managed,multi-columndomainindexes.Thiseliminatesthemanualmanagementofcompositedomainindexes.Supportforparallelloadandinsertsupporthasalsoaddedfordomainindexes.Index Compression EnhancementsAdvancedIndexCompression(AIC)hasbeenaddedtothisrelease,allowingforhighcompression;versusthelowindexcompressioninpriorreleases.AICreducesstageusageforallsupporteduniqueandnon-uniqueindexeswhilestillprovidingefficientaccesstimes.HighIndexcompressionimplementsnewcompressionalgorithms,whichallowforgreatercompressionratios.Thehigh-levelcompression,isthenewdefaultforOracle12.2.Toenablehighleveladvancedcompression,thecompatibleparametermustbeadvancedto12.2.0orhigher.However,atthegainofhighercompression,wesacrificeadditionalCPUpenalty.Tocreateahighleveladvancedcompressedindex,addthe“COMPRESSADVANCEDHIGH”clausetotheCREATEINDEXstatementlikethecodeexamplebelow: 1 CREATE INDEX consultant_idx ON consultants(consultant_id) 2* COMPRESS ADVANCED HIGH SQL> / Index created. WecanalsorebuildtheindexandchangethecompressionfromLOWtoHIGHwiththeALTERINDEXcommand: 1* ALTER INDEX consultant_idx REBUILD COMPRESS ADVANCED HIGH SQL> / Index altered. AICworksforallsupportedindexes.WiththeintroductiontoAICinOracle12.2,bitmappedindexesandindex-organizedtablesarenotsupported.TheCOMPRESSIONcolumnintheDBA_INDEXESview,indicatesthatourCONSULTANT_IDXindexthatwejustcreatediscompressedhigh: 1 select index_name, compression from dba_indexes 2* where index_name='CONSULTANT_IDX' SQL> / INDEX_NAME COMPRESSION ------------------------------ ------------- CONSULTANT_IDX ADVANCED HIGH Thiscolumncanhaveuptofourpossiblevalues:ADVANCEDHIGH,ADVANCEDLOW,DISABLEDorENABLED.TheCOMPRESSIONcolumnalsoexistsintheDBA_IND_PARTITIONSandtheDBA_IND_SUBPARTITIONSviews,aswecancreatehighcompressedindexesforpartitionedandsub-partitionedindexes.Wecanevencreatehighcompressedindexesonindexpartitions,eventhoughtheparentindexisnotpartitioned.Hash and List Partitioning for Spatial Indexes
Startingwiththisrelease,OracleprovidessupporthashandlistpartitionsforSpatialindexes.Previously,onlyrangepartitionedindexesforSpatialdatawassupported.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Ninth Day of 12.2, my DBA gave to me… In-Memory (IM) New Features
December20,2016
Technology Overview
Database:12c(12.2)
Company:OracleCorporation
Technology:In-Memory
Viscosity can help with any of your 12.2 needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
In-Memory Expressions
AnIn-memoryexpression,or“hot”expression,enablesfrequentlyevaluatedqueryexpressionstobematerializedintheIn-MemoryColumnStore,forsubsequentreuse.Bydefault,theprocedureDBMS_INMEMORY_ADMIN.IME_CAPTURE_EXPRESSIONSidentifiesandpopulatesIMexpressions.
Populatingthematerializedvaluesoffrequentlyusedqueryexpressions,intotheIn-MemoryColumnStore,greatlyreducesthesystemresourcesrequiredtoexecutequeries,allowingforbetterscalability.Theprocedure,IME_CAPTURE_EXPRESSIONS,willcaptureandpopulatethe20“hottest”expressionsinthedatabaseforaspecifiedtimerange.
In-Memory Virtual Columns
AnIMvirtualcolumn,isavaluederivedbyevaluatinganexpression.IMvirtualcolumnsimprovequeryperformancebyavoidingrepeatedcalculations.Also,thedatabasecanscanandfilterIMvirtualcolumns,usingtechniquessuchasSIMDvectorprocessing.
In-Memory FastStart
Before12.2,thecolumnarformatwasonlyavailableIn-Memory,meaningthatafteradatabaserestart,theIn-MemoryColumnStorewouldhavetobepopulated.Thismultiplestepprocess,convertedtraditional,rowformatteddataintothecompressedcolumnarformatandplacedin-memory.
Now,In-MemoryColumnStoreoptimizesthecompressedcolumnarpopulationofdatabaseobjects(tables,partitions,andsubpartitions)intheIn-Memorycolumnstore.Thisprocess,significantlyreducesthetimerequiredtore-populateIn-Memoryobjects.
UseDBMS_INMEMORY_ADMIN.FASTSTART_ENABLEproceduretoenableaspecifictablespaceforFastStart
Automatic Data Optimization (ADO) Support for In-Memory Column Store
In12.2,ADOnowalsomanagestheIMcolumnstoreasanewdatatier.Whenenabled,theHeatMapfeatureautomaticallytracksdataaccesspatterns;ADOusesthisHeatMapdatatoimplementuser-definedpoliciesatthedatabaselevel.ADOmanagestheIn-MemoryColumnStore,bymovingobjects(tables,partitionsorsubpartitions)inandoutofthememory,basedonHeatMapstatistics.
www.viscosityna.com
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
In-Memory Join Groups
IMcolumnstorescanusejoingroups,tooptimizejoinsofpopulatedIMtables.Joingroups,eliminatetheperformanceoverheadofdecompressingandhashingcolumnvalues.CreatejoingroupsusingtheCREATEINMEMORYJOINGROUPstatement:
CREATE INMEMORY JOIN GROUP prodid_jg (mine.items(product_id),mine.product_line(product_id));
In-Memory Support on Oracle Active Data Guard
12.2,allowsIMcolumnstoretobeenabledonOracleActiveDataGuardenvironments,bysettingtheinit.oraparameterINMEMORY_ADG_ENABLEDtoTRUE.Usingthein-memorycolumnstore,onanActiveDataGuardstandbydatabase,enablesuserstooffloadlargerandheavierreportingworkloads,ontoStandbyDatabases.Moreover,12.2permitstheStandbyDatabasetopopulateacompletelydifferentsetofdatainthein-memorycolumnstorethanthePrimaryDatabase,providinggreaterdataaccessflexibility.
In-Memory Column Store Dynamic Resizing
Youcannowdynamicallyincreasethesizeofthein-memoryarea,whilethedatabaseisopen,assumingthatenoughmemoryisavailablewithintheSGA.Thus,thein-memorycolumnstorecanberesizedwithoutrestartingthedatabase,providinggreaterapplicationavailability.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Tenth Day of 12.2, my DBA gave to me… RMAN New Features
December21,2016
ThefollowingarechangesintheOracleDatabaseBackupandRecoveryReferenceforDatabase12cRelease2(12.2.01).AllfeaturesrequiretheCOMPATIBLEinitializationparametermustbesetto12.2.0.0orhigher.
Technology Overview
Database:12c(12.2)
Company:OracleCorporation
Technology:RMAN
Viscosity can help with any of your 12.2 needs
Viscosityhasperformed
numerouszero-downtime
databasemigrationsand
upgradesovertheyearsandhas
aproventrackrecordwith
businesscriticalandmission
criticaldatabases.
Viscosity’sDatabaseMigration
&UpgradeServicescanplan,
upgrade,validateandmigrate
alldatabasecontent-quickly
andeffectivelywithour
automatedapproachand
provenmethodology.
Learnmoreabouthowyoucan
maintainandmaximizeyour
investmentsatviscosityna.com.
Formoreinformation,emailus
Perform Flashback on a Pluggable Database (PDB) to a Specified Point in Time
YoucanperformaflashbackdatabaseoperationtorewindanindividualPDBtoapreviouspointintime.ThisenablesyoutoreverseunwantedchangesmadetoasinglePDB,withoutimpactingtheoperationoftheremainingPDBs.Whenusingrestorepoints,youcanrewindthePDB,toeitheraPDBrestorepointorCDBrestorepoint.PDBrestorepointscanbenormalrestorepointsorguaranteedrestorepoints.
Additionally,in12.2userscanexecuteadatabaseflashbackonaCDBacrossPDB,PITRorPDBflashbackoperations.
ThePDBonwhichaFlashbackDatabaseoperationisbeingperformedmustbeclosed,thoughotherPDBsmaybeopenandoperational.WheninvokingtheRMANRECOVERcommand,RMANmustbeconnectedtotherootasacommonuserwiththeSYSDBAorSYSBACKUPprivilege.
ThisexamplewillillustratethePDBFlashbackcapability.First,createaguaranteedPDBrestorepointinvnapdbwhenconnectedtothePDB(thePDBismounted).Then,performDMLoperationsonthetablesinthePDBvnapdb.
SQL> CREATE RESTORE POINT vnapdb_grp_before_changes GUARENTEE FLASHBACK DATABASE;
Now,wewouldliketorewindthePDBjustbeforethedatachanges,whichinthiscaseistherestorepoint,VNAPDB_GRP_BEFORE_CHANGES,whichisaguaranteedPDBrestorepoint.ConnecttotheCDBasacommonuserwiththeSYSDBAorSYSBACKUPprivilege.ToperformaflashbackoperationforVNAPDB,thisPDBmustbeclosed.AllotherPDBsintheCDBcanremainopenandoperational.
PlacethePDBinmountmode,flashbackthePDBtotheguaranteedPDBrestorepoint,andthenopenthePDBwithresetlogs.Inthisexample,theCDBusessharedundo,therefore,anauxiliaryinstanceisusedtostoretemporaryfilesduringtheflashbackoperation.
www.viscosityna.com
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
RMAN> SHUTDOWN IMMEDIATE;
RMAN> STARTUP MOUNT;
RMAN> FLASHBACK PLUGGABLE DATABASE vnapdb TO RESTORE POINT vnapdb_grp_before_changes
AUXILIARY DESTINATION '/temp/aux_dest';
RMAN> ALTER PLUGGABLE DATABASE vnapdb OPEN RESETLOGS;
Validation and Recovery of Nonlogged Data Blocks
InaDataGuardenvironment,youcanperformrecoveryofnon-loggeddatablocks,byfetchingdatablocksfromtheprimaryorphysicalstandbydatabase.Youcanalsoperformvalidationtodetermineifthedatablocks,inthenon-loggedblockranges,arestillinvalid.TorecoverallblocksreportedintheV$DATABASE_BLOCK_CORRUPTIONview,eitheruseRECOVERCORRUPTIONLIST,specifythedatafilenumberandblocknumberorspecifythetablespaceanddatablockaddress(DBA).
ForRMANtobeabletosearchastandbydatabaseforgoodcopiesofcorruptblocks,thetargetdatabasemustbeassociatedwithaphysical,standbydatabaseinaDataGuardenvironment.Inaddition,thephysicalstandbydatabasemustbeopen,read-onlyinmanagedrecovery.
RMANfirstperformsavalidationtodeterminethenon-loggedblockranges;andthenusestheserangestoperformrecoveryoftheobjectsspecifiedinthedbObjectclause.
Therecoveryofnon-loggedblocks,canbeexecutedeitherfromtheprimaryorphysicalstandbydatabase.Whenrunonaphysicalstandbydatabase,RECOVERfetchesdatablocksfromtheprimarydatabase.Whenrunonaprimarydatabase,datablocksarefetchedfromthemostappropriatestandbydatabase.BeforeissuingaRECOVERcommandwiththisoption,youmuststopstandbyrecovery.
Enhancements to Table Recovery
YoucanusetheREMAPTABLEclause,torecovertablesortablepartitionsintoaschema,thatisdifferentfromtheschemainwhichtheseobjectsoriginallyexisted.AsingleRECOVERcommand,cancontaintablesandtablepartitionsbelongingtodifferentsourceschemas.IfmultipletablesarespecifiedintheRECOVERcommand,thenyoucanimportallthespecifiedobjects,intothesametargetschemaorintodifferenttargetschemas.Additionally,ifrecoveringtablesortablepartitionsintoadifferentschema,youcaneitherrenametheobjectsorretaintheoriginalobjectnames.
Thefollowingexample,recoversthetablesVNA.EMPLOYEESandVNASALES.CHANNELStablesuntilthespecifiedSCN.TherecoveredEMPLOYEEStable,ismappedtotheVNAEXschemaandtherecoveredCHANNELStable,ismappedtotheVNASCHschema.Theseschemasarealreadycreatedinthetargetdatabase.TheCHANNELStablewasstoredintheSALES_TBStablespace.Afterthetableisrecovered,itwillbemappedtotheNEW_SALES_TBStablespace.Anauxiliarydestinationisusedtostorethetemporarydatabasefiles,createdaspartofthetablerecoveryprocess.
Torecoverthistable,youmusthaveabackupoftheSYSTEM,SYSAUX,undo,HR,andSHtablespaces.ThedatabasemustbeinARCHIVELOGmodewhenthebackupwascreated,torecoverthetableaswell.
RECOVER TABLE VNA.employees, VNASALES.channels UNTIL SCN 2456
REMAP TABLE VNA.employees:VNAEX.employees, VNASALES.channels:VNASCH.channels
REMAP TABLESPACE 'SALES_TBS':'NEW_SALES_TBS'
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
AUXILIARY DESTINATION '/u01/oradata/vnaauxdest';
Enhancements to the DUPLICATE Command
UsetheFORFARSYNCclause,oftheDUPLICATEcommand,tocreateanOracleDataGuardfarsyncinstancebyduplicatingatargetdatabase.
AsofOracleDatabase12cRelease2(12.2.0.1),whenapasswordfileismanuallyupdatedatafarsyncinstance;theredocontainingthesamepasswordchangesfromtheprimarydatabaseisautomaticallypropagated,toanystandbydatabasesthataresetuptoreceiveredofromthatfarsyncinstance.Thepasswordfileisupdatedonthestandby,whentheredoisapplied.
Enhancements to Cross-Platform Transport
RMANsupportscross-platformtransportofaPDBintoatargetCDB.Youcanperformcross-platformtransportoftablespacesoverthenetwork.Encryptedtablespaces,canalsobetransportedtodifferentplatforms.Tocreatebackupsetsthattransportdatatoanotherplatform,theCOMPATIBLEparameterinthetargetdatabasemustbe12.0.0orhigher.Whilebackinguptablespacesforcross-platformtransport,iftheALLOWINCONSISTENTclauseisnotused,thetablespacesmustbeinread-onlymode.
Backup and Recovery of Sparse Databases
RMANenablesyoutobackup,restore,recover,andduplicatesparsedatafilesthatarefromasetoftablespaces,CDBs,PDBsorwholedatabases.Thiscanbebackedup,intoabackupsetorimagecopyformat.
Asparsebackup,backsupdatablocksofsparsedatafilesthatarechangedeltasofstoragespace;i.e.,itdoesnotbackupthedatablocksfromthephysicalbackingdatafiles.Thebackingdatafilesinasparsedatabaseenvironment,mustberead-onlybeforebackupisexecuted.
Ifyouwanttoperformatraditionalfullorincrementalbackuponasparsedatabase,thenusethebackupwiththeFROMNONSPARSEoption.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Eleventh Day of 12.2, my DBA gave to me… Utilities, PL/SQL, and Much More
December22,2016
Technology Overview
Database:12c(12.2)
Company:OracleCorporation
Technology:Utilities,PL/SQL,and
MuchMore
Viscosity can help with any of your 12.2 needs
Viscosityhasperformed
numerouszero-downtime
databasemigrationsand
upgradesovertheyearsandhas
aproventrackrecordwith
businesscriticalandmission
criticaldatabases.
Viscosity’sDatabaseMigration
&UpgradeServicescanplan,
upgrade,validateandmigrate
alldatabasecontent-quickly
andeffectivelywithour
automatedapproachand
provenmethodology.
Learnmoreabouthowyoucan
maintainandmaximizeyour
investmentsatviscosityna.com.
Formoreinformation,emailus
Dynamic Debugger
Priorto12.2,ifyouwantedtoenabledebugging,ithadtorunthroughouttheprocess;whichwasnotpossibleonsomeofthedatawarehouseenvironments;becausetheprocessranlongandgeneratedtoomanylogs.In12.2,OracleintroducesthenewfeatureDynamicDebugging,ontherunningprocess.Thisprovidestheabilitytoidentifytheproblem(s)inalongproductionprocess.Italsoallowsthepossibility,ofinvestigatingtheproblemfromanothersessionaswell.Inadditiontoinspectingthestateofin-scopevariables;itisnowpossibletoexaminethedatabasestateasthesessionbeingdebuggedviewsit,duringanuncommittedtransaction.
Detect Deprecated Functions in PL/SQL Block
Thisfeatureavoidsusingdeprecatedfunctionsonanewversion.Sometimes,developerswillcontinuetousetheexistingPL/SQLcodeonnewerdatabaseversions,toavoidre-programming.Thisleadstomanyperformanceissues,executioninefficiencies,andpotentiallywrongresultsets.Ifpragmaisused,itwilldisplayawarningmessageifanydeprecatedfunctionsareused.However,sometimesfunctionalitycausesexistingcodebenefitstobeimplementedinincompatibleways.Forexample,theUTL_CALL_STACKpackage,whichwasnewinOracleDatabase12cRelease1(12.1),providedthefunctionalitythatearlierwasprovidedbytheFORMAT_CALL_STACK,FORMAT_ERROR_STACK,andFORMAT_ERROR_BACKTRACEproceduresintheDBMS_UTILITYpackage.Inasimilarway,thishappensincustomdevelopedPL/SQLcode.Improvements in Materialized Views (MVs)
Real-Time MVs Startingwith12.2,thereareseveralnewfeaturesthatarehelpfulwithreal-timedatarefresh,providingmoreaccuratedata.Queryrewrite,worksoptimallywithnon-synchronizedbasetablesandmaterializedviewlogsaswell. Statement-Level Refresh for MVs Statement-LevelRefreshforMVs,providesflexibilitytomaterializedviewrewrite,especiallyforcomplextransactionsinvolvingmultipleDMLstatements.Itoffersbuilt-inrefreshcapabilities,thatcanreplacecustomer-writtentrigger-basedsolutions,simplifyinganapplicationwhileofferinghigherperformance.
www.viscosityna.com
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Refresh Statistics History for MVs OracleprovidesanadditionallayerofinformationforMaterializedviewsrefreshstatistics.Wecanmanagecollectionandretentionofhistoricalrefreshstatisticsforanalyticsanddetailedreporting.Bysettingtherefreshstatisticshistory,wecantracktheperformanceoftheMVrefreshovertimeandtrendexecutiontime.Itisalsopossible,tocomparethecurrentrefreshexecutiontimetodiagnosticpurposes;todetermineiftherefreshdelayiscausedbyadditionaldataorsystemperformance.WecanleveragetheDBMS_MVIEW_STATS.SET_MVREF_STATS_PARAMSprocedure,tomanagecollectionandretentionofMVrefreshstatistics.
DBA View for Static and Dynamic SQL Reports
TheviewDBA_STAMENTS,helpsknowtheuseofSQLinaPL/SQLcode;includingtheresearchofSQLinperformance,includingstaticanddynamicSQL.ThisviewprovidestheuseofstaticSQLforDML;likeSELECT,INSERT,UPDATEandDELETEanddynamicSQL,likeIMMEDIATE,EXECUTE,andOPENCURSORwiththeSQL_ID.Inaddition,theview,DBA_IDENTIFIERS,providesinformationonthestaticSQLidentifierssuchastable,column,materializedview,sequence,andothers.
DBMS_PLSQL_CODE_COVERAGE Package
DBMS_PLSQL_CODE_COVERAGEPackage,isautilitytocollectdetailinformationonPL/SQLblock.APL/SQLblock,canhaveanentryandexitinstruction,includingexceptionandmovepointtoanotherPL/SQLblock.Theprimaryusage,istoreviewandanalyzetheresultsofcodetesting;aswellasincorporatingitintocodemeasurementtests,inanon-productionenvironment.Intheregressiontestandothers,theinformationprovidedfromthepackagewillhelpwithcollectingdataforPL/SQLunitintestrun.
Other PL/SQL Improvements • PL/SQLPragmatomarkanitemasdeprecated.• EnhancedLISTAGGfunctionalityandfeatures.• ApproximationofQueryProcessingforpercentileaggregationandotherlargevolumesofdataprocessing.
Enhancements for Exadata
ExaDirect SQL*Net Adapter EnhancementstotheSQL*Nettransport,allowforlowlatencydatabaseaccess,byutilizingtheRDMAoverInfiniBandprotocol.Thisnewprotocol,isonlysupportedonOracleLinuxatthetimeofthispost.Upgrading the Incremental Transportable Scripts InOracle12.2,migratingfromabig-endianarchitecturetoExadata,hasbeenimprovedwiththeuseofcross-platformincrementalbackups.Thesetypesofmigrationstypicallyhavelongoutagewindows,becauseutilizingtransportabletablespacemigrationstypicallyhasthedatainaread-onlystate;essentiallymakingthedatabaseunusablebytheapplication.Crossplatformincrementalbackups,allowthiswindowtobeshortenedtojustthetimeneededtocompletethemigrationtothemetadataexportandimport.
Partitioning: Improving Support for XMLIndex NewXMLIndexpartitioningsupportfortheXMLTypedatatype,hasbeenaddedtoallowforbetterparalleloperationsduringlargeworkloadstobeoffloaded,fromthecomputenodestothestoragecells.
XML Pushdown IfXMLdataisbeingstoredinaSecureFilesLOB,certainWHEREclauseconditionscancausequeryprocessingtobeoffloadedtothestoragecells.ZFS Analytics Withrelease12.2,statisticsfordatabasesutilizingZFSstorage,overDirectNFSversions4and4.1,canbereportedtothestorageappliance;basedondatabaseIDsandpluggabledatabaseIDsallowingformoredetailedstatisticsonhoweachdatabaseinteractswiththedisk.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Net Services Misc In12.2,theNetworkServiceslayerofSQL*NETwasimprovedbyusingthenewExaDirectSQL*Netadapter.Thisadapterwillprovidelowlatencydatabaseaccess,byleveragingRemoteDirectMemoryAccess(RDMA)inanInfiniBandenvironment.TheExadirectprotocol,usesTCPforcomms(communication)controlandIBRCtransportfordata.Exadirect,canbeusedasatransportprotocolbetweenExadatanodes.ForExadirecttowork,theversionofExadatamustbe12.1.2.3.3orhigher.Ontheclientside,specifythenetworkservicenamethatusesthesameExadirectaddress,asconfiguredinthetnsnames.ora.Exadirectflowcontrolisspecifiedinsqlnet.orausingtheexadirect_flow_control=ontoenable.Forexample: (DESCRIPTION = (ADDRESS = (PROTOCOL = exadirect) (HOST = dc1dbm01-exavna) (port = 1522)) (CONNECT_DATA = (SERVICE_NAME = sales.vna.com))) Toconfigureadatabaseserver,configuretheExadirectaddressinthelistener.oraasenable_exadirect_listener_name=ontoconfiguretheparameters.Thefollowingexample,dc1dbm01-vnatheportnumberonacomputerequippedwithIBinterfaceis1522showstheExadirectendpoints.LISTENER = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = exadirect) (HOST = dc1dbm01-exavna ) (PORT = 1522)) (ADDRESS = (PROTOCOL = tcp) (HOST = dc1dbm01-vna ) (PORT = 1521)) (ADDRESS = (PROTOCOL = ipc) (KEY = extproc))))) ENABLE_EXADIRECT_LISTENER = on
Scheduler
Anti-Affinity Rules Wecannowspecifythatascheduledjobcannotrunatthesametimewithanotherscheduledjob.Forexample,wemayhavebatchjobsthatlockthesametableorjobs,whichconsumemostofthesystemresources.Forthesekindsofbatchjobs,wecandefinerulesthatprohibitthemfromexecutingatthesametime.Byleveragingthedbms_scheduler.create_incompatibilityprocedure,itdefinesthejobsthatareincompatibletobeexecutedatthesametime.Oraclealsoprovidesthecapabilitytoaddajoborprogramtoanexistingcompatibilitydefinitionwiththedbms_scheduler.add_to_incompatibilityprocedure;orevenremoveajoborprogramfromanexistingincompatibilitydefinitionwiththedbms_scheduler.remove_from_incompatibilityprocedure. Resource Queues StartingwithOracle12.2,wecandefineasetofresourcesforascheduledjob.Aresource,canbeanythingthatisdefinedwithtwoattributes:nameandcountwiththeDBMS_SCHEDULER.CREATE_RESOURCEprocedure.TheDBMSScheduler,willensurethatthescheduledjobwillnotexceedtheresourcesspecifiedforthejobdefinition. In-Memory Job Now,itispossibletocreatein-memoryjobs.Wecancreatetwotypesofin-memoryjobs:repeating(in-memoryruntimejobs)andone-timejobs(in-memoryfulljobs).In-memoryjobsconsumesignificantlylessI/Othanlessregularjobs,becauseitusesmemorycachetoreducediskI/O.Withrepeatingin-memoryjobs,onlythejobmetadataiswrittentodisk.Repeatingjobsarepersistent,withtheabilitytohavearepeatintervalandexecutemultipletimes.Allin-memoryjobs,bydefault,areassignedtheDEFAULT_IN_MEMORY_JOB_CLASSwhichhasalogginglevelofNONE;thus,runinformationforone-timeorrepeatingin-memoryjobs,arenotcapturedintheOracleviewsrelatedtotheScheduler.Thisresultsinfasterperformance,asnothingiswrittentodiskatexecutiontime.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
One-timejobsarealsopersistentononeoftheRACnodeswheretheywerecreated.
Data Pump
Parallel Export and Import of Metadata TheparallelparameterinDataPump,inthepreviousrelease,wasonlyrelevantfordata.Thefunctionalityhasbeenextendedtoincludemetadataforexportandimportoperations.ForoperationslikeTransportableTablespace(TTS)metadataimports,itcansignificantlyreducethemetadataimporttimes,becausemultipleprocessescanworkinparalleltoimportthemetadatacollectedfromthesourcedatabase.Rename Data Files During TTS Import Now,renamingdatafilesaspartoftheTTSimportcanbedone.Priorto12.2,wecouldlisteveryfileintheTRANPORT_DATAFILESparameter.Theasterisk(*)symbolmatchesmultiplecharactersandquestionmark(?)matchesasinglecharacter.Forexample,inOracle12.1,wehadtolistouteverydatafile:TRANSPORT_DATAFILES=vna_data01.dbf TRANSPORT_DATAFILES=vna_data02.dbf TRANSPORT_DATAFILES=vna_index1.dbf TRANSPORT_DATAFILES=vna_index2.dbf InOracle12.2,wecanusewildcardstosimplifyourTTSprocessandlowerourmanagementoverhead.TRANSPORT_DATAFILES=vna_data*.dbf TRANSPORT_DATAFILES=vna_index?.dbf Beingabletorenamedatafiles,potentiallyeliminatestheneedtoissueALTERTABLESPACEorALTERDATABASERENAMEFILEcommandsaftertheTTSimport.Additional Wildcard Substitution Variables AsofOracle12.2,wenowhavetheabilitytospecifydateortimevalues,aswellassystemgenerateduniquefilenamesforDataPumpfilenames.Therangefornumericvaluerangesisalsoincreased.PriortoOracle12.2,%Ugeneratedafixedwidth,2-digitnumber.Newoptionsexistfor12.2expdpandimpdp.Addingthe%lor%Loptionsincrementsthenumberfrom01upto2147483646.Newoptionsin12.2expdpfordateandtimeare:
• %dor%DtospecifyDayofMonthinDDformat• %mor%MtospecifynumberofmonthinMMformat• %yor%YtospecifyyearinYYYYformat• %tor%TtospecifyfulldateinYYYYMMDDformat
Additional DATA_OPTIONS Parameters DataPump,hasnewparametersfortheDATA_OPTIONSparameter.DATA_OPTIONS=VALIDATE_TABLE_DATA,isforimportonlyandvalidatesdateandnumberformatsoftabledata.ThedefaultbehaviorforDataPumpistoperformnovalidation.Wewillwanttousethisoptionwhentheoriginatorofthedataisnotfromatrustedsource.Inthepreviousrelease,importingdataintoanexistingtablewasdoneserially.TheDATA_OPTIONS=EXISTING_TABLE_PARTITIONSparameters,instructsDataPumptoloadpartitiondatainparallel,intoexistingtablesandoffersabigperformanceboost.Onthetargetdatabaseplatform,youcanpre-stagethetablespriortodatapump,butthepartitionattributesandpartitionnamesmustbeidenticaltothesourcedatabase.TheDATA_OPTIONS=GROUP_PARTITION_TABLE_DATAparameterofdatapumpexport,informsdatapumptounloadalltabledatainasingleoperationinparallel;ratherthanbreakinguptheunloadprocessforeachpartitionasaseparateoperation.Byspecifyingasingleoperationforallthepartitions,theimportprocessisalsosimplified.Direct Load in Network Mode Previously,datapumpmovedtabledatainanetworkimportviaINSERTASSELECTSQLstatement,whichhadalimitationonLongandLongRawdatatypes.Now,datapumpleveragesOCIDirPathUnloadtounloaddatafromthesourcedatabase.Datapump
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
leveragesOCIDirPathLoadtoloadthedataintothetargetdatabase.WeneedtospecifyACCESS_METHOD=DIRECT_PATHparameterwiththeNETWORK_LINKparametertoleveragethisnewfeature.Instant Client DatapumpisnowavailableintheInstanceClient.OraclealsoaddedSQL*Loader,expdp,impdp,exp,andimptothetoolsforinstantclient.Younolongerneedacompletedatabaseinstallationtoinvokethesetools.Interactive Commands Oraclehasnewinteractivecommandsfordatapump.Wecannowenabletracingforarunningjob;nolongerneedingtostop/restartthejobforthetracingtotakeeffect.Asofthisrelease,wecanallkillindividualworksthatwebelievetobehungorstuck,withtheSTOP_WORKERoption.OraclealsoenhancedthelogfilewiththeexistingMETRICS=Yoption.Now,thelogfileshowtheworkerIDforeachitemprocessedandaccessmethodforeachtable.Thelogfilealsoincludestheparfileinformation.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
On the Twelfth Day of 12.2, my DBA gave to me… PDB New Features
December23,2016
Technology Overview
Database:12c(12.2)
Company:OracleCorporation
Technology:PDB
Viscosity can help with any of your Database Upgrade needs
Viscosityhasperformednumerouszero-downtimedatabasemigrationsandupgradesovertheyearsandhasaproventrackrecordwithbusinesscriticalandmissioncriticaldatabases.
Viscosity’sDatabaseMigration&UpgradeServicescanplan,upgrade,validateandmigratealldatabasecontent-quicklyandeffectivelywithourautomatedapproachandprovenmethodology.
Learnmoreabouthowyoucanmaintainandmaximizeyourinvestmentsatviscosityna.com.Formoreinformation,[email protected].
www.viscosityna.com
OracleintroducedtheirPluggableDatabases(PDBs)technologyinOracleDatabase12cRelease1,withthegoalofhelpingcustomersmigrateandconsolidatehundreds,oreventhousands,ofstandalonedatabases;intotheirmultitenantpluggabledatabasesontheprivatedatabasecloudortoOracle’sDatabaseCloudService.Architecturally,aPDBisafullyfunctional,self-containedOracledatabase,andapplicationscannotdistinguishdifferencesofbeingconnectedtoaPDBversusastandalonedatabase.PDBsalsohavecompletesecuredisolationandseparation,asiftheyweretwototallyindependentdatabasestoday.ForthelastdayofourTwelveDaysof12.2,wearegoingtofocusonPDBs.TherearesomanynewfeaturesinthePDBarchitectureinOracleDatabase12cRelease2,wecanalmostwriteabookjustonthistopic.Inthisarticle,wewillfocusonthekeynewfeatures,andin2017,oneofourACEDirectors,CharlesKim,willrunaseparateseriesdedicatedtoPDBsandprovideadeep-diveofarchitectureandcodeexamples.Hot ClonesInOracle12.1,whenwecloneaPDB,thesourcePDBmustbequiescedforthedurationofthecloningactivity.Thesourcedatabasemustincuraslightoutagewindowforthedurationofthecloningprocess.Oracle12.2Multitenantoption,fullyintegratestheconceptof“hotclones”withtheabilitytoperformon-linecloningofPDBs.Withhotclones,thesourcedatabaseisstillopenforread-writemode.StartingwithOracle12.2,allPDBclonesarehotclonesandwillbereferredtoasclones.Read-Only Refreshable PDBs
Buildingontopofthehotclonetechnology,Oracle12.2offerstheRefreshablePDBfeature.AclassicusecaseofaRefreshablePDB,isareportingdatabasethatcanwithstanda24-hourlagfromtheprimarydatabase.WhenwecloneaPDB,thecreationtimetocopydatafromthesourcePDB,cantakehoursorevendaysdependingonthesizeofyourdatabase.SincewearenowonOracle12.2,thedurationoftimedoesnotmatter,asPDBscanbeclonedwhilethesourcePDBisonline.WithRefreshablePDBs,wecanhavethePDBrefreshdatafromthesourcePDBwithdeltachanges,sincethelastrefreshautomatically(defineinnnnMinutes)orondemand.Thereareseveralrestrictionsfortherefreshtowork:
1. TheRefreshablePDBmustneverbeopenedinread-writemode.BringingtheRefreshablePDBtoread-writemode,willcauseOracletonotbeabletoapplyUNDOinformationfromthesource.
2. Duringtherefreshprocess,theRefreshablecopymustbeshutdown.TocreateaRefreshablePDB,wecanusetheCREATEPLUGGABLEDATABASEwiththenewoptionsfor:
• REFRESH MODE EVERY nnn MINUTES;Wherennnisrepresentedinminutes
• REFRESH MODE MANUAL; WherethePDBisrefreshedon-demand
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
OncethePDBiscreatedwiththeREFRESHMODE,weneedtoopenthePDBinREADONLYmodewiththeALTERPLUGGABLEDATABASEpdbrefresh1READONLYcommand.WecanmanuallyrefreshanyRefreshablePDBwiththeALTERPLUGGABLEDATABASE[pdbname]REFRESHstatement.PDB Relocate
PDBRelocateisbuiltontopofRefreshablePDBtechnology.InsteadofhotcloningaPDB,migratingusersfromoldtothenewPDB,anddroppingthesourcePDBoncethecloneiscomplete;OracleoffersanewRELOCATEclausetotheCREATEPLUGGABLEDATABASE,to“relocate”aPDBfromonecontainerdatabase(CDB)toanothercontainerdatabase.ThePDBcanberelocatedtoanotherCDBonthesameserver,withinthesamedatacenteroracrossdatacenters.TorelocateaPDB,wehavetoissuetheCREATEPLUGGABLEDATABSEcommandwiththeFROMandRELOCATEclauses.RelocatingaPDBisthefastestwaytomoveaPDBfromoneCDBtoanotherwithminimaldowntime.Whiletherelocationprocessisoccurring,databaseconnectionsstillpersistontheoriginalPDB.Whenthestatementcompletes,therewillbetwotransactionallyconsistentPDBsrunning.Next,OraclequiescesthesourcePDB,totransportandapplyredodatatotherelocatingPDB.WhenthePDBisready,therelocatedPDBwillbebroughtonlineonthenewtargetCDB.DuringtherelocationprocesstothenewCDB,DMLandDDLgetquiescedandredirectedtotherelocatedPDB.SELECTqueriescontinuetobeexecutedwithoutanypause.Next,Oraclehastorelocateallthedatabaseconnections.Inanutshell,connectionsareslowlydrainedfromtheoriginalPDBtothenewrelocatedPDB.WhenweopenthenewPDBonthetargetCDB,thesourcePDBisdropped.
Localized UNDO
AsofOracle12.2,wehavetheoptiontorunUNDOinthelocalPDBs.IfthelocalUNDOoptionisenabled,eachofthePDBswillhaveit’sownUNDOtablespace.ThereisnomixofpartiallocalUNDOandsharedUNDO.Youareeither100%localUNDOor100%sharedUNDO.BylocalizingUNDOtoitsowntablespace,OraclefurtherachievestheisolationofPDBs.AnotherpowerfulfeaturethatisinheritedfromlocalizedUNDO,isthecapabilitytoflashbackaPDB.LocalizedUNDOisalsothefoundationforRefreshPDB,PDBRelocateandFlashbackPDBtechnology.SharedUNDOstillexistsforOracle12.2,butprimarilyisusedforupgradetransitionpurposes.IfyouareupgradingfromOracle12.1toOracle12.2,OraclerecommendstoadoptlocalUNDOassoonaspossible.Bydefault,DBCAcreatesallOracle12.2databaseswithlocalUNDOenabled.
PDB Memory Allocation
Now,withOracle12.2,wecansetthefollowinginitializationparametersatthePDBlevel:• DB_CACHE_SIZE• SHARED_POOL_SIZE• PGA_AGGREGATE_TARGET• SGA_MIN_SIZE• SGA_TARGET
SGA_MIN_SIZEistheguaranteedSGAsize,whichincludesDB_CACHE_SIZEandSHARED_POOL_SIZE)forPDBs.Ingeneral,thetotalofallSGA_MIN_SIZEshouldnotbegreaterthan50%oftheSGA.
PDB CPU Count
WithOracle12.2,wecansettheCPU_COUNTinitializationparametersatthePDBlevel.InOracle12.1,CPUlimitswereimposedonthePDBaspartoftheCDBResourcePlandefinition.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
4096 PDBs per CDB
WhenPDBswerefirstintroducedinOracle12.1,thenumberofPDBsperCDBwas252.AsofOracle12.2,thislimithassignificantlyincreasedto4,096.ThislevelofconsolidationmaybeachievedbySaaScompanies.
Localized AWR
AWRdataisnowavailableatthePDBlevel.HavingtheAWRatthePDBlevel,allowsforagranularleveloftuninganddiagnostics.OraclenowintroducestheconceptofthePluggableDBAs(PDBAs),sothateachPDBcanbepotentiallymaintainedbyaPDBAdministrator.
PDBs with Different Character Sets
InOracle12.2,CDBscanhavePDBswithdifferentcharactersets,aslongastherootcontainer’scharactersetisthesupersetofallofthePDBcharactersets.BysupportingPDBsofdifferentcharactersets,OraclenowsupportsrollingupgradesofaCDBwithPDBs,thathousedifferentcharactersets.
Heat Map
PDBsareabletobenefitfromOracle’sAutomaticDataOptimizationcapabilities,becauseOraclePDBsnowhavefullHeatMapsupport.
Support for PDBs with Different Time Zone File Versions and Database Time Zones
Now,PDBsinaCDBcanbeindifferenttimezonefileversionsanddatabasetimezones.
TwelveDaysof12.2
Copyright © 2016 Viscosity North America, Inc. All rights reserved.
Coming Soon
WeareonlyscratchingthesurfaceofincrediblenewfeaturesintroducedinOracleDatabase12cRelease2.Pleasestaytunedin2017,aswenotonlyprovideadeep-diveinsightintotheabovementionednewfeatures,butalsothefeatureslistedbelow:
Perr-Process PGA Limits Comingsoon
Performance Profiles and Mandatory PDB Profiles Comingsoon
Lockdown Profiles Comingsoon
Application Root Comingsoon
Proxy PDB Comingsoon
Forwarding Connections to a New Address Based on Service Comingsoon
Service-Level ACLs for TCP Protocol Comingsoon
Data Guard Support Comingsoon
Flashback PDB Comingsoon
PDB OS Credentials Comingsoon
PDB Upgrades Comingsoon
Cross Platform Import of PDBs Comingsoon
IO Rates and Limits per PDB Comingsoon
Hints in Containers Clause Comingsoon
Parallel PDB Creation Comingsoon
PDB Archives Comingsoon
PDB Upgrades Comingsoon
Top Related