Вы находитесь на странице: 1из 21

OracleDBAInterviewQuestionsandAnswers­RAC

OracleRACInterviewQuestionsandAnswers

HowdoesOCSSDstartsfirstifvotingdisk&OCRresidesinASMDiskgroups?

YoumightwonderhowCSSD,whichisrequiredtostarttheclusteredASMinstance,canbestartedif

votingdisksarestoredinASM?

Thissoundslikeachicken­and­eggproblem:

withoutaccesstothevotingdisksthereisnoCSS,hencethenodecannotjointhecluster. Butwithoutbeingpartofthecluster,CSSDcannotstarttheASMinstance.

TosolvethisproblemtheASMdiskheadershavenewmetadatain11.2:

youcanusekfedtoreadtheheaderofanASMdiskcontainingavotingdisk.

Thekfdhdb.vfstartandkfdhdb.vfendfieldstellCSSwheretofindthevotingfile.ThisdoesnotrequiretheASM

instancetobeup.

Oncethevotingdisksarelocated,CSScanaccessthemandjoinsthecluster.

WhatisgsdctlinRAC?listgsdctlcommandsinOracleRAC?

GSDCTLstandsforGlobalServiceDaemonControl,wecanusegsdctlcommandstostart,stop,andobtainthe

statusoftheGSDserviceonanyplatform.

Theoptionsforgsdctlare:­ $gsdctlstart­­TostarttheGSDservice $gsdctlstop ­­TostoptheGSDservice $gsdctlstat ­­ToobtainthestatusoftheGSDservice

Logfilelocationforgsdctl:

$ORACLE_HOME/srvm/log/gsdaemon_node_name.log

WhatisRAC?

RACstandsforRealApplicationcluster.

ItisaclusteringsolutionfromOracleCorporationthatensureshighavailabilityofdatabasesbyproviding

instancefailover,mediafailoverfeatures.

OracleRACisaclusterdatabasewithasharedcachearchitecturethatovercomesthelimitationsoftraditional

shared­nothingandshared­diskapproachestoprovideahighlyscalableandavailabledatabasesolutionforall

thebusinessapplications.

OracleRACprovidesthefoundationforenterprisegridcomputing.

WhatisOracleRACOneNode?

OracleRAConeNodeisasingleinstancerunningononenodeoftheclusterwhilethe2ndnodeisincold

standbymode.IftheinstancefailsforsomereasonthenRAConenodedetectitandrestarttheinstanceonthe

samenodeortheinstanceisrelocatetothe2ndnodeincasethereisfailureorfaultin1stnode.Thebenefitof

thisfeatureisthatitprovidesacoldfailoversolutionanditautomatestheinstancerelocationwithoutany

downtimeanddoesnotneedamanualintervention.Oracleintroducedthisfeaturewiththereleaseof11gR2

(availablewithEnterpriseEdition).

WhatisRACandhowisitdifferentfromnonRACdatabases?

OracleRealApplicationclustersallowsmultipleinstancestoaccessasingledatabase,theinstanceswillbe

runningonmultiplenodes.

InRealApplicationClustersenvironments,allnodesconcurrentlyexecutetransactionsagainstthesame

database.

RealApplicationClusterscoordinateseachnode'saccesstotheshareddatatoprovideconsistencyand

integrity.

WhataretheadvantagesofRAC(RealApplicationClusters)?

Reliability­ifonenodefails,thedatabasewon'tfail

Availability­nodescanbeaddedorreplacedwithouthavingtoshutdownthedatabase

Scalability­morenodescanbeaddedtotheclusterastheworkloadincreases

WhatisOracleRACOneNode?

OracleRAConeNodeisasingleinstancerunningononenodeoftheclusterwhilethe2ndnodeisincold

standbymode.IftheinstancefailsforsomereasonthenRAConenodedetectitandrestarttheinstanceonthe

samenodeortheinstanceisrelocatetothe2ndnodeincasethereisfailureorfaultin1stnode.Thebenefitof

thisfeatureisthatitprovidesacoldfailoversolutionanditautomatestheinstancerelocationwithoutany

downtimeanddoesnotneedamanualintervention.Oracleintroducedthisfeaturewiththereleaseof11gR2

(availablewithEnterpriseEdition).

WhatisCacheFusion?

OracleRACiscomposedoftwoormoreinstances.Whenablockofdataisreadfromdatafilebyaninstance

withintheclusterandanotherinstanceisinneedofthesameblock,itiseasytogettheblockimagefromthe

instancewhichhastheblockinitsSGAratherthanreadingfromthedisk.Toenableinterinstance

communicationOracleRACmakesuseofinterconnects.TheGlobalEnqueueService(GES)monitorsand

Instanceenqueueprocessmanagesthecachefusion.

WhatcommandwouldyouusetochecktheavailabilityoftheRACsystem?

crs_stat­t­v(­t­vareoptional)

HowdoweverifythatRACinstancesarerunning?

SQL>select*fromV$ACTIVE_INSTANCES;

ThequerygivestheinstancenumberunderINST_NUMBERcolumn,host_:instancenameunderINST_NAME

column.

HowcanyouconnecttoaspecificnodeinaRACenvironment?

tnsnames.oraensurethatyouhaveINSTANCE_NAMEspecifiedinit.

Whichisthe"MASTERNODE"inRAC?

Thenodewiththelowestnodenumberwillbecomemasternodeanddynamicremasteringoftheresourceswill

takeplace.

Tofindoutthemasternodeforparticularresource,youcanqueryv$ges_resourceforMASTER_NODE

column.

Tofindoutwhichisthemasternode,youcanseeocssd.logfileandsearchfor"masternodenumber".

whenthefirstmasternodefailsintheclusterthelowestnodenumberwillbecomemasternode.

WhatcomponentsinRACmustresideinsharedstorage?

Alldatafiles,controlfiles,SPFIles,redologfilesmustresideoncluster­awareshredstorage.

Givefewexamplesforsolutionsthatsupportclusterstorage? ·ASM(automaticstoragemanagement), ·Rawdiskdevices, ·Networkfilesystem(NFS),

·OCFS2and

·OCFS(OracleClusterFiesystems).

WhatareOracleClusterComponents?

1.ClusterInterconnect(HAIP)

2.SharedStorage(OCR/VotingDisk)

3.Clusterwaresoftware

4.OracleKernelComponents

WhatareOracleRACComponents?

VIP,Nodeappsetc.

WhatareOracleKernelComponents?

BasicallyOraclekernelneedtoswitchedonwithRACOnoptionwhenyouconverttoRAC,thatisthedifference

asitfacilitatesfewRACbgprocesslikeLMON,LCK,LMD,LMSetc.

HowtoturnonRAC?

#linktheoraclelibraries

$cd$ORACLE_HOME/rdbms/lib

$make­fins_rdbms.mkrac_on

#rebuildoracle

$cd$ORACLE_HOME/bin

$relinkoracle

DiskarchitechtureinRAC?

SAN(StorageAreaNetworks)­generallyusingfibretoconnecttotheSAN

NAS(NetworkAttachedStorage)­generallyusinganetworktoconnecttotheNASusingeitherNFS,ISCSI

WhatisOracleClusterware?

TheClusterwaresoftwareallowsnodestocommunicatewitheachotherandformstheclusterthatmakesthe

nodesworkasasinglelogicalserver.

ThesoftwareisrunbytheClusterReadyServices(CRS)usingtheOracleClusterRegistry(OCR)thatrecords

andmaintainstheclusterandnodemembershipinformationandthevotingdiskwhichactsasatiebreaker

duringcommunicationfailures.Consistentheartbeatinformationtravelsacrosstheinterconnecttothevoting

diskwhentheclusterisrunning.

RealApplicationClusters

OracleRACisaclusterdatabasewithasharedcachearchitecturethatovercomesthelimitationsoftraditional

shared­nothingandshared­diskapproachestoprovideahighlyscalableandavailabledatabasesolutionforall

yourbusinessapplications.OracleRACprovidesthefoundationforenterprisegridcomputing.

Oracle’sRealApplicationClusters(RAC)optionsupportsthetransparentdeploymentofasingledatabase

acrossaclusterofservers,providingfaulttolerancefromhardwarefailuresorplannedoutages.OracleRAC

runningonclustersprovidesOracle’shighestlevelofcapabilityintermsofavailability,scalability,andlow­cost

computing.

OneDBopenedbymultipeinstancessothethedbllbeHighlyAvailableifaninstancecrashes.

ClusterSoftware.OraclesClusterwareorproductslikeVeritasVolumeManagerarerequiredtoprovidethe

clustersupportandalloweachnodetoknowwhichnodesbelongtotheclusterandareavailableandwith

OracleCluterwaretoknowwhichnodeshavefailedandtoejectthenfromthecluster,sothaterrorsonthat

nodecanbecleared.

OracleClusterwarehastwokeycomponentsClusterRegistryOCRandVotingDisk.

Theclusterregistryholdsallinformationaboutnodes,instances,servicesandASMstorageifused,italso

containsstateinformationietheyareavailableanduporsimilar.

Thevotingdiskisusedtodetermineifanodehasfailed,i.e.becomeseparatedfromthemajority.Ifanodeis

deemedtonolongerbelongtothemajoritythenitisforciblyrebootedandwillaftertherebootadditselfagain

thethesurvivingclusternodes.

WhataretheOracleClusterwarekeycomponents?

OracleClusterwarehastwokeycomponentsClusterRegistryOCRandVotingDisk.

WhatisVotingDiskandOCR?

VotingDisk

OracleRACusesthevotingdisktomanageclustermembershipbywayofahealthcheckandarbitratescluster ownershipamongtheinstancesincaseofnetworkfailures.Thevotingdiskmustresideonshareddisk. Anodemustbeabletoaccessmorethanhalfofthevotingdisksatanytime.

Forexample,ifyouhave3votingdisksconfigured,thenanodemustbeabletoaccessatleasttwoofthe

votingdisksatanytime.Ifanodecannotaccesstheminimumrequirednumberofvotingdisksitisevicted,or

removed,fromthecluster.

OracleClusterRegistry(OCR)

Theclusterregistryholdsallinformationaboutnodes,instances,servicesandASMstorageifused,italso

containsstateinformationietheyareavailableanduporsimilar.

TheOCRmustresideonshareddiskthatisaccessiblebyallofthenodesinyourcluster.

Whataretheadministrativetasksinvolvedwithvotingdisk?

Followingadministrativetasksareperformedwiththevotingdisk:

1)Backingupvotingdisks

2)RecoveringVotingdisks

3)Addingvotingdisks

4)Deletingvotingdisks

5)Movingvotingdisks

Canyouaddvotingdiskonline?Doyouneedvotingdiskbackup? Yes, asperdocumentation,ifyouhavemultiplevotingdiskyoucanaddonline,butifyouhaveonlyonevoting disk,bythatclusterwillbedownasitslostyoujustneedtostartcrsinexclusivemodeandaddthevotedisk using crsctladdvotedisk<path>

WhatistheOracleRecommendationforbackingupvotingdisk?

Oraclerecommendsustousetheddcommandtobackupthevotingdiskwithaminimumblocksizeof4KB.

Howdowebackupvotingdisks?

1)Oraclerecommendsthatyoubackupyourvotingdiskaftertheinitialclustercreationandafterwecomplete

anynodeadditionordeletionprocedures.

2)First,asrootuser,stopOracleClusterware(withthecrsctlstopcrscommand)onallnodes.Then,determine

thecurrentvotingdiskbyissuingthefollowingcommand:

crsctlqueryvotediskcss

3)Then,issuetheddorocopycommandtobackupavotingdisk,asappropriate.

Givethesyntaxofbackingupvotingdisks:­

OnLinuxorUNIXsystems:

ddif=voting_disk_nameof=backup_file_name

where,

voting_disk_nameisthenameoftheactivevotingdisk

backup_file_nameisthenameofthefiletowhichwewanttobackupthevotingdiskcontents

OnWindowssystems,usetheocopycommand:

copyvoting_disk_namebackup_file_name

HowdoweverifyanexistingcurrentbackupofOCR?

WecanverifythecurrentbackupofOCRusingthefollowingcommand:ocrconfig­showbackup

YouhavelostOCRdisk,whatisyournextstep?

Theclusterstackwillbedownduetothefactthatcssdisunabletomaintaintheintegrity,thisistruein10g,

From11gR2onwards,thecrsdstackwillbedown,thehasdstillupandrunning.Youcanaddtheocrbackby

restoringtheautomaticbackuporimportthemanualbackup,

WhatarethemajorRACwaitevents?

InaRACenvironmentthebuffercacheisglobalacrossallinstancesintheclusterandhencetheprocessing

differs.Themostcommonwaiteventsrelatedtothisaregccrrequestandgcbufferbusy

GCCRrequest:thetimeittakestoretrievethedatafromtheremotecache

Reason:RACTrafficUsingSlowConnectionorInefficientqueries(poorlytunedquerieswillincreasethe

amountofdatablocksrequestedbyanOraclesession.Themoreblocksrequestedtypicallymeansthemore

oftenablockwillneedtobereadfromaremoteinstanceviatheinterconnect.)

GCBUFFERBUSY:Itisthetimetheremoteinstancelocallyspendsaccessingtherequesteddatablock.

WhatdoyoudoifyouseeGCCRBLOCKLOSTintop5TimedEventsinAWRReport?

Thisismostlikelyduetoafaultininterconnectnetwork.

Checknetstat­s

ifyousee"fragmentsdropped"or"packetreassembliesfailed",Workwithyoursystemadministratorfindthe

faultwithnetwork.

Howdoyoutroubleshootnodereboot? Pleasecheckmetalink

Note265769.1TroubleshootingCRSReboots

Note.559365.1UsingDiagwaitasadiagnostictogetmoreinformationfordiagnosingOracleClusterwareNode

evictions.

Srvctlcannotstartinstance,IgetthefollowingerrorPRKP­1001CRS­0215,howeversqlpluscanstartit

onbothnodes?Howdoyouidentifytheproblem? SettheenvironmentalvariableSRVM_TRACEtotrue Andstarttheinstancewithsrvctl.Nowyouwillget detailederrorstack.

WhatareOracleClusterwareprocessesfor10gonUnixandLinux?

ClusterSynchronizationServices(ocssd)—Managesclusternodemembershipandrunsastheoracle

user;failureofthisprocessresultsinclusterrestart.

ClusterReadyServices(crsd)—Thecrsprocessmanagesclusterresources(whichcouldbeadatabase,an

instance,aservice,aListener,avirtualIP(VIP)address,anapplicationprocess,andsoon)basedonthe

resource'sconfigurationinformationthatisstoredintheOCR.Thisincludesstart,stop,monitorandfailover

operations.Thisprocessrunsastherootuser

Eventmanagerdaemon(evmd)—Abackgroundprocessthatpublisheseventsthatcrscreates.

ProcessMonitorDaemon(OPROCD)—ThisprocessmonitortheclusterandprovideI/Ofencing.OPROCD

performsitscheck,stopsrunning,andifthewakeupisbeyondtheexpectedtime,thenOPROCDresetsthe

processorandrebootsthenode.AnOPROCDfailureresultsinOracleClusterwarerestartingthenode.

OPROCDusesthehangchecktimeronLinuxplatforms.

RACG(racgmain,racgimon)—ExtendsclusterwaretosupportOracle­specificrequirementsandcomplex

resources.RunsservercalloutscriptswhenFANeventsoccur.

WhatareOracledatabasebackgroundprocessesspecifictoRAC?

OracleRACiscomposedoftwoormoredatabaseinstances.TheyarecomposedofMemorystructuresand

backgroundprocessessameasthesingleinstancedatabase.OracleRACinstancesusetwoprocesses

GES(GlobalEnqueueService),GCS(GlobalCacheService)thatenablecachefusion.OracleRACinstancesare

composedoffollowingbackgroundprocesses:

ACMS—AtomicControlfiletoMemoryService(ACMS)

GTX0­j—GlobalTransactionProcess

LMON—GlobalEnqueueServiceMonitor LMD—GlobalEnqueueServiceDaemon LMS—GlobalCacheServiceProcess

LCK0—InstanceEnqueueProcess

RMSn—OracleRACManagementProcesses(RMSn)

RSMN—RemoteSlaveMonitor

ToensurethateachOracleRACdatabaseinstanceobtainstheblockthatitneedstosatisfyaqueryor

transaction,OracleRACinstancesusetwoprocesses,theGlobalCacheService(GCS)andtheGlobal

EnqueueService(GES).TheGCSandGESmaintainrecordsofthestatusesofeachdatafileandeachcached

blockusingaGlobalResourceDirectory(GRD).TheGRDcontentsaredistributedacrossalloftheactive

instances.

WhatisGRD?

GRDstandsforGlobalResourceDirectory.TheGESandGCSmaintainsrecordsofthestatusesofeach

datafileandeachcahedblockusingglobalresourcedirectory.Thisprocessisreferredtoascachefusionand

helpsindataintegrity.

WhatisACMS?

ACMSstandsforAtomicControlfileMemoryService.InanOracleRACenvironmentACMSisanagentthat

ensuresadistributedSGAmemoryupdate(ie)SGAupdatesaregloballycommittedonsuccessorglobally

abortedineventofafailure.

WhatisSCANlistener?

Ascanlistenerissomethingthatadditionaltonodelistenerwhichlistenstheincomingdbconnectionrequests

fromtheclientwhichgotthroughthescanIP,itgotendpointsconfiguredtonodelistenerwhereitroutesthedb

connectionrequeststoparticularnodelistener.

SCANIPcanbedisabledifnotrequired.HoweverSCANIPismandatoryduringtheRACinstallation. Enabling/disablingSCANIPismostlyusedinoracleappsenvironmentbytheconcurrentmanager(kindofjob schedulerinoracleapps). StepstodisabletheSCANIP, i. DonotuseSCANIPattheclientend. ii.Stopscanlistener srvctlstopscan_listener iii.Stopscan srvctlstopscan(thiswillstopthescanvip's) iv.Disablescananddisablescanlistener srvctldisablescan

Whatarethedifferentnetworkcomponentsarein10gRAC?

public,private,andvipcomponents

Privateinterfacesisforintranodecommunication.

VIPisallaboutavailabilityofapplication.WhenanodefailsthentheVIPcomponentfailovertosomeother

node,thisisthereasonthatallapplicationsshouldbasedonvipcomponentsmeanstnsentriesshouldhavevip

entryinthehostlist

Whatisaninterconnectnetwork?

Aninterconnectnetworkisaprivatenetworkthatconnectsalloftheserversinacluster.Theinterconnect

networkusesaswitch/multipleswitchesthatonlythenodesintheclustercanaccess.

Whatistheuseofclusterinterconnect?

ClusterinterconnectisusedbytheCachefusionforinterinstancecommunication.

Howcanweconfiguretheclusterinterconnect?

·ConfigureUserDatagramProtocol(UDP)onGigabitEthernetforclusterinterconnects.

·OnUNIXandLinuxsystemsweuseUDPandRDS(Reliabledatasocket)protocolstobeusedbyOracle

Clusterware.

·WindowsclustersusetheTCPprotocol.

WhatisthepurposeofPrivateInterconnect?

Clusterwareusestheprivateinterconnectforclustersynchronization(networkheartbeat)anddaemon

communicationbetweenthetheclusterednodes.ThiscommunicationisbasedontheTCPprotocol.

RACusestheinterconnectforcachefusion(UDP)andinter­processcommunication(TCP).CacheFusionis

theremotememorymappingofOraclebuffers,sharedbetweenthecachesofparticipatingnodesinthecluster.

WhatisavirtualIPaddressorVIP?

AvirtualIPaddressorVIPisanalternateIPaddressthattheclientconnectionsuseinsteadofthestandard

publicIPaddress.ToconfigureVIPaddress,weneedtoreserveaspareIPaddressforeachnode,andtheIP

addressesmustusethesamesubnetasthepublicnetwork.

WhatistheuseofVIP?

Ifanodefails,thenthenode'sVIPaddressfailsovertoanothernodeonwhichtheVIPaddresscanacceptTCP

connectionsbutitcannotacceptOracleconnections.

WhydowehaveaVirtualIP(VIP)inOracleRAC? WithoutusingVIPsorFAN,clientsconnectedtoanodethatdiedwilloftenwaitforaTCPtimeoutperiod(which

canbeupto10min)beforegettinganerror.Asaresult,youdon'treallyhaveagoodHAsolutionwithoutusing

VIPs.

Whenanodefails,theVIPassociatedwithitisautomaticallyfailedovertosomeothernodeandnewnodere­

arpstheworldindicatinganewMACaddressfortheIP.SubsequentpacketssenttotheVIPgotothenew

node,whichwillsenderrorRSTpacketsbacktotheclients.Thisresultsintheclientsgettingerrors

immediately.

GivesituationsunderwhichVIPaddressfailoverhappens?

VIPaddressesfailoverhappenswhenthenodeonwhichtheVIPaddressrunsfails;allinterfacesfortheVIP

addressfails,allinterfacesfortheVIPaddressaredisconnectedfromthenetwork.

WhatisthesignificanceofVIPaddressfailover?

WhenaVIPaddressfailoverhappens,ClientsthatattempttoconnecttotheVIPaddressreceivearapid

connectionrefusederror.Theydon'thavetowaitforTCPconnectiontimeoutmessages.

WhatistheuseofaserviceinOracleRACenvironment?

ApplicationsshouldusetheservicesfeaturetoconnecttotheOracledatabase.Servicesenableustodefine

rulesandcharacteristicstocontrolhowusersandapplicationsconnecttodatabaseinstances.

WhatarethecharacteristicscontrolledbyOracleservicesfeature?

Thecharacteristicsincludeauniquename,workloadbalancing,failoveroptions,andhighavailability.

WhatenablestheloadbalancingofapplicationsinRAC?

OracleNetServicesenabletheloadbalancingofapplicationconnectionsacrossalloftheinstancesinan

OracleRACdatabase.

Whatarethetypesofconnectionload­balancing?

ConnectionWorkloadmanagementisoneofthekeyaspectswhenyouhaveRACinstancesasyouwantto

distributetheconnectionstospecificnodes/instanceorthosehavelessload.

Therearetwotypesofconnectionload­balancing:

1.ClientSideloadbalancing(alsocalledasconnecttimeloadbalancing)

2.Serversideloadbalancing(alsocalledasListenerconnectionloadbalancing)

Whatisthedifferencebetweenserver­sideandclient­sideconnectionloadbalancing?

Client­sidebalancinghappensatclientsidewhereloadbalancingisdoneusinglistener.Incaseofserver­side

loadbalancinglistenerusesaload­balancingadvisorytoredirectconnectionstotheinstanceprovidingbest

service.

ClientSideloadbalancing:­Oracleclientsideloadbalancingfeatureenablesclientstorandomizethe

connectionrequestsamongalltheavailablelistenersbasedontheirload.

Antnsentrythatcontainsallnodesentriesanduseload_balance=on(defaultitson)willusetheconnecttime

loadbalancingorclientsideloadbalancing.

SampleClientSideTNSEntry:­

finance= (DESCRIPTION=

(ADDRESS=(PROTOCOL=TCP)(HOST=myrac2­vip)(PORT=2042))

(ADDRESS=(PROTOCOL=TCP)(HOST=myrac1­vip)(PORT=2042))

(ADDRESS=(PROTOCOL=TCP)(HOST=myrac3­vip)(PORT=2042))

(LOAD_BALANCE=yes)

(CONNECT_DATA=

(SERVER=DEDICATED)

(SERVICE_NAME=FINANCE)(FAILOVER=ON)

(FAILOVER_MODE= (TYPE=SELECT)(METHOD=BASIC)(RETRIES=180)(DELAY=5))

)

)

Serversideloadbalancing:­Thisimprovestheconnectionperformancebybalancingthenumberofactive

connectionsamongmultipleinstancesanddispatchers.Inasingleinstanceenvironment(sharedservers),the

listenerselectstheleastdispatchertohandletheincomingclientrequests.Inaracenvironments,PMONis

awareofallinstancesloadanddispatchers,anddependingontheloadinformationPMONredirectsthe

connectiontotheleastloadednode.

InaRACenvironment,*.remote_listenerparameterwhichisatnsentrycontainingallnodesaddressesneedto

settoenabletheloadbalanceadvisoryupdatestoPMON.

SampleTnsentryshouldbeinaninstancesofRACcluster,

local_listener=LISTENER_MYRAC1

remote_listener=LISTENERS_MYRACDB

WhataretheadministrativetoolsusedforOracleRACenvironments?

OracleRACclustercanbeadministeredasasingleimageusingthebelow

· OEM(EnterpriseManager),

· SQL*PLUS,

· Servercontrol(SRVCTL),

· ClusterVerificationUtility(CLUVFY),

· DBCA,

· NETCA

NamesomeOracleClusterwaretoolsandtheiruses?

·OIFCFG­allocatinganddeallocatingnetworkinterfaces.

·OCRCONFIG­Command­linetoolformanagingOracleClusterRegistry.

·OCRDUMP­Identifytheinterconnectbeingused.

·CVU­ClusterverificationutilitytogetstatusofCRSresources.

WhatisthedifferencebetweenCRSCTLandSRVCTL?

crsctlmanagesclusterware­relatedoperations:

StartingandstoppingOracleClusterware

EnablinganddisablingOracleClusterwaredaemons

Registeringclusterresources

srvctlmanagesOracleresource–relatedoperations:

Startingandstoppingdatabaseinstancesandservices

Alsofrom11gR2managestheclusterresourceslikenetwork,vip,disksetc

HowdoweremoveASMfromaOracleRACenvironment?

Weneedtostopanddeletetheinstanceinthenodefirstininteractiveorsilentmode.Afterthatasmcanbe

removedusingsrvctltoolasfollows:

srvctlstopasm­nnode_name

srvctlremoveasm­nnode_name

WecanverifyifASMhasbeenremovedbyissuingthefollowingcommand:

srvctlconfigasm­nnode_name

HowdoweverifythataninstancehasbeenremovedfromOCRafterdeletinganinstance?

Issuethefollowingsrvctlcommand:

srvctlconfigdatabase­ddatabase_name

cdCRS_HOME/bin

./crs_stat

WhatarethemodesofdeletinginstancesfromORacleRealApplicationclusterDatabases?

WecandeleteinstancesusingsilentmodeorinteractivemodeusingDBCA(DatabaseConfigurationAssistant).

Whatarethebackgroundprocessthatexistsin11gr2andfunctionality?

ProcessName Functionality crsd •TheCRSdaemon(crsd)managesclusterresourcesbasedonconfigurationinformationthatisstored inOracleClusterRegistry(OCR)foreachresource.Thisincludesstart,stop,monitor,andfailoveroperations. Thecrsdprocessgenerateseventswhenthestatusofaresourcechanges. cssd •ClusterSynchronizationService(CSS):Managestheclusterconfigurationbycontrollingwhichnodes aremembersoftheclusterandbynotifyingmemberswhenanodejoinsorleavesthecluster.Ifyouareusing certifiedthird­partyclusterware,thenCSSprocessesinterfaceswithyourclusterwaretomanagenode membershipinformation.CSShasthreeseparateprocesses:theCSSdaemon(ocssd),theCSSAgent (cssdagent),andtheCSSMonitor(cssdmonitor).Thecssdagentprocessmonitorstheclusterandprovides input/outputfencing.ThisserviceformerlywasprovidedbyOracleProcessMonitordaemon(oprocd),also knownasOraFenceServiceonWindows.AcssdagentfailureresultsinOracleClusterwarerestartingthenode. diskmon •DiskMonitordaemon(diskmon):Monitorsandperformsinput/outputfencingforOracleExadata StorageServer.AsExadatastoragecanbeaddedtoanyOracleRACnodeatanypointintime,thediskmon daemonisalwaysstartedwhenocssdisstarted. evmd •EventManager(EVM):IsabackgroundprocessthatpublishesOracleClusterwareevents mdnsd •Multicastdomainnameservice(mDNS):AllowsDNSrequests.ThemDNSprocessisabackground processonLinuxandUNIX,andaserviceonWindows. gnsd •OracleGridNamingService(GNS):IsagatewaybetweentheclustermDNSandexternalDNS servers.TheGNSprocessperformsnameresolutionwithinthecluster. ons •OracleNotificationService(ONS):Isapublish­and­subscribeserviceforcommunicatingFast ApplicationNotification(FAN)events oraagent •oraagent:ExtendsclusterwaretosupportOracle­specificrequirementsandcomplexresources.It runsservercalloutscriptswhenFANeventsoccur.ThisprocesswasknownasRACGinOracleClusterware

11gRelease1(11.1).

orarootagent •Oraclerootagent(orarootagent):IsaspecializedoraagentprocessthathelpsCRSDmanage resourcesownedbyroot,suchasthenetwork,andtheGridvirtualIPaddress oclskd •Clusterkilldaemon(oclskd):Handlesinstance/nodeevictionsrequeststhathavebeenescalatedto CSS gipcd •GridIPCdaemon(gipcd):Isahelperdaemonforthecommunicationsinfrastructure ctssd •Clustertimesynchronisationdaemon(ctssd)tomanagethetimesyncrhonizationbetweennodes, ratherdependingonNTP

Underwhichuserorownertheprocesswillstart? Component NameoftheProcess Owner OracleHighAvailabilityService ohasd init,root ClusterReadyService(CRS) ClusterReadyServices root ClusterSynchronizationService(CSS) ocssd,cssdmonitor,cssdagent gridowner

EventManager(EVM)

ClusterTimeSynchronizationService(CTSS) octssd

OracleNotificationService(ONS)

OracleAgent

OracleRootAgent

evmd,evmlogger

ons,eons

oragent

gridowner

root

orarootagent

gridowner

root

gridowner

GridNamingService(GNS)

gnsd

root

GridPlugandPlay(GPnP)

gpnpd

gridowner

Multicastdomainnameservice(mDNS)

mdnsd

gridowner

Whatisthemajordifferencebetween10gand11gRAC?

Thereisnotmuchdifferencebetween10gand11gR(1)RAC.Butthereisasignificantdifferencein11gR2.

Priorto11gR1(10g)RAC,thefollowingweremanagedbyOracleCRS

Databases

Instances

Applications

NodeMonitoring

EventServices

HighAvailability

From11gR2(onwards)itscompletedHAstackmanagingandprovidingthefollowingresourcesasliketheother

clustersoftwarelikeVCSetc.

Databases

Instances

Applications

ClusterManagement

NodeManagement

EventServices

HighAvailability

NetworkManagement(providesDNS/GNS/MDNSDservicesonbehalfofothertraditionalservices)and

SCAN–SingleAccessClientNamingmethod,HAIP

StorageManagement(withhelpofASMandothernewACFSfilesystem)

Timesynchronization(ratherdependingupontraditionalNTP)

RemovedOSdependenthangcheckeretc,manageswithownadditionalmonitorprocess

Whatishangchecktimer? Thehangchecktimerchecksregularlythehealthofthesystem.Ifthesystemhangsorstopthenodewillbe restartedautomatically.

Thereare2keyparametersforthismodule:

­>hangcheck­tick:thisparameterdefinestheperiodoftimebetweenchecksofsystemhealth.Thedefault

valueis60seconds;Oraclerecommendssettingitto30seconds.

­>hangcheck­margin:thisdefinesthemaximumhangdelaythatshouldbetoleratedbeforehangcheck­timer

resetstheRACnode.

StatetheinitializationparametersthatmusthavesamevalueforeveryinstanceinanOracleRAC

database?

Someinitializationparametersarecriticalatthedatabasecreationtimeandmusthavesamevalues.Theirvalue

mustbespecifiedinSPFILEorPFILEforeveryinstance.Thelistofparametersthatmustbeidenticalonevery

instancearegivenbelow:

ACTIVE_INSTANCE_COUNT

ARCHIVE_LAG_TARGET

COMPATIBLE

CLUSTER_DATABASE

CLUSTER_DATABASE_INSTANCE

CONTROL_FILES

DB_BLOCK_SIZE

DB_DOMAIN

DB_FILES

DB_NAME

DB_RECOVERY_FILE_DEST

DB_RECOVERY_FILE_DEST_SIZE

DB_UNIQUE_NAME

INSTANCE_TYPE(RDBMSorASM)

PARALLEL_MAX_SERVERS

REMOTE_LOGIN_passWORD_FILE

UNDO_MANAGEMENT

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

WhatisRAC?WhatisthebenefitofRACoversingleinstancedatabase?

InRealApplicationClustersenvironments,allnodesconcurrentlyexecutetransactionsagainstthesame

database.RealApplicationClusterscoordinateseachnode'saccesstotheshareddatatoprovideconsistency

andintegrity.

Benefits:

Improveresponsetime

Improvethroughput

Highavailability

Transparency

AdvantagesofRAC(RealApplicationClusters)

Reliability­ifonenodefails,thedatabasewon'tfail

Availability­nodescanbeaddedorreplacedwithouthavingtoshutdownthedatabase

Scalability­morenodescanbeaddedtotheclusterastheworkloadincreases

WhatisavirtualIPaddressorVIP?

AvirtualIPaddressorVIPisanalternateIPaddressthattheclientconnectionsuseinsteadofthestandard

publicIPaddress.ToconfigureVIPaddress,weneedtoreserveaspareIPaddressforeachnode,andtheIP

addressesmustusethesamesubnetasthepublicnetwork.

WhatistheuseofVIP?

Ifanodefails,thenthenode'sVIPaddressfailsovertoanothernodeonwhichtheVIPaddresscanacceptTCP

connectionsbutitcannotacceptOracleconnections.

GivesituationsunderwhichVIPaddressfailoverhappens:­

VIPaddressesfailoverhappenswhenthenodeonwhichtheVIPaddressrunsfails,allinterfacesfortheVIP

addressfails,allinterfacesfortheVIPaddressaredisconnectedfromthenetwork.

UsingvirtualIPwecansaveourTCP/IPtimeoutproblembecauseOraclenotificationservicemaintains

communicationbetweeneachnodesandlisteners.

WhatisthesignificanceofVIPaddressfailover?

WhenaVIPaddressfailoverhappens,ClientsthatattempttoconnecttotheVIPaddressreceivearapid

connectionrefusederror.Theydon'thavetowaitforTCPconnectiontimeoutmessages.

Whatisvotingdisk?

VotingDiskisafilethatsitsinthesharedstorageareaandmustbeaccessiblebyallnodesinthecluster.All

nodesintheclusterregisterstheirheart­beatinformationinthevotingdisk,soastoconfirmthattheyareall

operational.Ifheart­beatinformationofanynodeinthevotingdiskisnotavailablethatnodewillbeevicted

fromthecluster.TheCSS(ClusterSynchronizationService)daemonintheclusterwaremaintainstheheart

beatofallnodestothevotingdisk.Whenanynodeisnotabletosendheartbeattovotingdisk,thenitwill

rebootitself,thushelpavoidingthesplit­brainsyndrome.

Forhighavailability,Oraclerecommendsthatyouhaveaminimumofthreeoroddnumber(3orgreater)of

votingdisks.

VotingDisk­isfilethatresidesonsharedstorageandManagesclustermembers. Votingdiskreassignscluster ownershipbetweenthenodesincaseoffailure.

TheVotingDiskFilesareusedbyOracleClusterwaretodeterminewhichnodesarecurrentlymembersofthe

cluster.ThevotingdiskfilesarealsousedinconcertwithotherClustercomponentssuchasCRStomaintain

theclustersintegrity.

OracleDatabase11gRelease2providestheabilitytostorethevotingdisksinASMalongwiththeOCR.Oracle

ClusterwarecanaccesstheOCRandthevotingdiskspresentinASMeveniftheASMinstanceisdown.Asa

resultCSScancontinuetomaintaintheOracleclustereveniftheASMinstancehasfailed.

Howmanyvotingdisksareyoumaintaining?

x

BydefaultOraclewillcreate3votingdiskfilesinASM.

Oracleexpectsthatyouwillconfigureatleast3votingdisksforredundancypurposes.Youshouldalways

configureanoddnumberofvotingdisks>=3.Thisisbecauselossofmorethanhalfyourvotingdiskswill

causetheentireclustertofail.

Youshouldplanonallocating280MBforeachvotingdiskfile.Forexample,ifyouareusingASMandexternal

redundancythenyouwillneedtoallocate280MBofdiskforthevotingdisk.IfyouareusingASMandnormal

redundancyyouwillneed560MB.

Whyweneedtokeepoddnumberofvotingdisks?

Oracleexpectsthatyouwillconfigureatleast3votingdisksforredundancypurposes.Youshouldalways

configureanoddnumberofvotingdisks>=3.Thisisbecauselossofmorethanhalfyourvotingdiskswill

causetheentireclustertofail.

WhatareOracleRACsoftwarecomponents?

OracleRACiscomposedoftwoormoredatabaseinstances.TheyarecomposedofMemorystructuresand

backgroundprocessessameasthesingleinstancedatabase.OracleRACinstancesusetwoprocesses

GES(GlobalEnqueueService),GCS(GlobalCacheService)thatenablecachefusion.OracleRACinstancesare

composedoffollowingbackgroundprocesses:

ACMS—AtomicControlfiletoMemoryService(ACMS)

GTX0­j—GlobalTransactionProcess

LMON—GlobalEnqueueServiceMonitor LMD—GlobalEnqueueServiceDaemon LMS—GlobalCacheServiceProcess

LCK0—InstanceEnqueueProcess

RMSn—OracleRACManagementProcesses(RMSn)

RSMN—RemoteSlaveMonitor

WhatareOracleClusterwareprocessesfor10g?

ClusterSynchronizationServices(ocssd)—Managesclusternodemembershipandrunsastheoracleuser;

failureofthisprocessresultsinclusterrestart.

ClusterReadyServices(crsd)—Thecrsprocessmanagesclusterresources(whichcouldbeadatabase,an

instance,aservice,aListener,avirtualIP(VIP)address,anapplicationprocess,andsoon)basedonthe

resource'sconfigurationinformationthatisstoredintheOCR.Thisincludesstart,stop,monitorandfailover

operations.Thisprocessrunsastherootuser

Eventmanagerdaemon(evmd)—Abackgroundprocessthatpublisheseventsthatcrscreates.

ProcessMonitorDaemon(OPROCD)—ThisprocessmonitortheclusterandprovideI/Ofencing.OPROCD

performsitscheck,stopsrunning,andifthewakeupisbeyondtheexpectedtime,thenOPROCDresetsthe

processorandrebootsthenode.AnOPROCDfailureresultsinOracleClusterwarerestartingthenode.

OPROCDusesthehangchecktimeronLinuxplatforms.

RACG(racgmain,racgimon)—ExtendsclusterwaretosupportOracle­specificrequirementsandcomplex

resources.RunsservercalloutscriptswhenFANeventsoccur.

WhatareOracledatabasebackgroundprocessesspecifictoRAC? LMS—GlobalCacheServiceProcess LMD—GlobalEnqueueServiceDaemon LMON—GlobalEnqueueServiceMonitor

LCK0—InstanceEnqueueProcess

OracleRACinstancesusetwoprocesses,theGlobalCacheService(GCS)andtheGlobalEnqueueService

(GES).TheGCSandGESmaintainrecordsofthestatusesofeachdatafileandeachcachedblockusinga

GlobalResourceDirectory(GRD).TheGRDcontentsaredistributedacrossalloftheactiveinstances.

WhatisCacheFusion? Transforofdataacrossinstances throughprivateinterconnectiscalledcachefusion.OracleRACiscomposed oftwoormoreinstances.Whenablockofdataisreadfromdatafilebyaninstancewithintheclusterand anotherinstanceisinneedofthesameblock,itiseasytogettheblockimagefromtheinsatncewhichhasthe blockinitsSGAratherthanreadingfromthedisk.ToenableinterinstancecommunicationOracleRACmakes useofinterconnects.TheGlobalEnqueueService(GES)monitorsandInstanceenqueueprocessmanagesthe cahcefusion

WhatisSCAN?(11gR2feature)

SingleClientAccessName(SCAN)issanewOracleRealApplicationClusters(RAC)11gRelease2feature

thatprovidesasinglenameforclientstoaccessanOracleDatabaserunninginacluster.Thebenefitisclients

usingSCANdonotneedtochangeifyouaddorremovenodesinthecluster.

SCANprovidesasingledomainnamevia(DNS),allowingand­userstoaddressaRACclusteras­ifitwerea

singleIPaddress.SCANworksbyreplacingahostnameorIPlistwithvirtualIPaddresses(VIP).

Singleclientaccessname(SCAN)ismeanttofacilitatesinglenameforallOracleclientstoconnecttothe

clusterdatabase,irrespectiveofnumberofnodesandnodelocation.Untilnow,wehavetokeepadding

multipleaddressrecordsinallclientstnsnames.ora,whenanewnodegetsaddedtoordeletedfromthe

cluster.

SingleClientAccessName(SCAN)eliminatestheneedtochangeTNSNAMESentrywhennodesareaddedto

orremovedfromtheCluster.RACinstancesregistertoSCANlistenersasremotelisteners.Oracle

recommendsassigning3addressestoSCAN,whichwillcreate3SCANlisteners,thoughtheclusterhasgot

dozensofnodes SCANisadomainnameregisteredtoatleastoneanduptothreeIPaddresses,eitherin DNS(DomainNameService)orGNS(GridNamingService).TheSCANmustresolvetoatleastoneaddress onthepublicnetwork.Forhighavailabilityandscalability,OraclerecommendsconfiguringtheSCANtoresolve tothreeaddresses.

WhatareSCANcomponentsinacluster?

1.SCANName

2.SCANIPs(3)

3.SCANListeners(3)

WhatisFAN?

FastapplicationNotificationasitabbreviatestoFANrelatestotheeventsrelatedtoinstances,servicesand

nodes.ThisisanotificationmechanismthatOracleRAcusestonotifyotherprocessesabouttheconfiguration

andservicelevelinformationthatincludesservicestatuschangessuchas,UPorDOWNevents.Applications

canrespondtoFANeventsandtakeimmediateaction.

WhatisTAF?

TAF(TransparentApplicationFailover)isaconfigurationthatallowssessionfail­overbetweendifferentnodes

ofaRACdatabasecluster.

TransparentApplicationFailover(TAF).Ifacommunicationlinkfailureoccursafteraconnectionisestablished,

theconnectionfailsovertoanotheractivenode.Anydisruptedtransactionsarerolledback,andsession

propertiesandserver­sideprogramvariablesarelost.Insomecases,ifthestatementexecutingatthetimeof

thefailoverisaSelectstatement,thatstatementmaybeautomaticallyre­executedonthenewconnectionwith

thecursorpositionedontherowonwhichitwaspositionedpriortothefailover.

AfteranOracleRACnodecrashes—usuallyfromahardwarefailure—allnewapplicationtransactionsare

automaticallyreroutedtoaspecifiedbackupnode.Thechallengeinreroutingistonotlosetransactionsthat

were"inflight"attheexactmomentofthecrash.Oneoftherequirementsofcontinuousavailabilityistheability

torestartin­flightapplicationtransactions,allowingafailednodetoresumeprocessingonanotherserver

withoutinterruption.Oracle'sanswertoapplicationfailoverisanewOracleNetmechanismdubbed

TransparentApplicationFailover.TAFallowstheDBAtoconfigurethetypeandmethodoffailoverforeach

OracleNetclient.

TAFarchitectureofferstheabilitytorestarttransactionsateitherthetransaction(SELECT)orsessionlevel.

WhataretherequirementsforOracleClusterware?

1.ExternalSharedDisktostoreOracleClusterwarefile(VotingDiskandOracleClusterRegistry­OCR)

2.Twonetwrokcardsoneachclusterwarenode(andthreesetofIPaddress)­

NetworkCard1(withIPaddressset1)forpublicnetwork

NetworkCard2(withIPaddressset2)forprivatenetwork(forinternodecommunicationbetweenracnodes

usedbyclusterwareandracdatabase)

IPaddressset3forVirtualIP(VIP)(usedasVirtualIPaddressforclientconnectionandforconnectionfailover)

Whichenablethe loadbalancingofapplicationsinRAC? OracleNetServicesenabletheloadbalancingofapplicationconnectionsacrossalloftheinstancesinan OracleRACdatabase.

HowtofindlocationofOCRfilewhenCRSisdown?

IfyouneedtofindthelocationofOCR(OracleClusterRegistry)butyourCRSisdown.

WhentheCRSisdown:

Lookinto“ocr.loc”file,locationofthisfilechangesdependingontheOS:

OnLinux:/etc/oracle/ocr.loc

OnSolaris:/var/opt/oracle/ocr.loc

WhenCRSisUP:

SetASMenvironmentorCRSenvironmentthenrunthebelowcommand:

ocrcheck

In2nodeRAC,howmanyNIC’sarerusing?

2networkcardsoneachclusterwarenode

NetworkCard1(withIPaddressset1)forpublicnetwork

NetworkCard2(withIPaddressset2)forprivatenetwork(forinternodecommunicationbetweenracnodes

usedbyclusterwareandracdatabase)

In2nodeRAC,howmanyIP’sarerusing?

6­3setofIPaddress

##eth1­Public: 2

##eth0­Private:2

##VIP:2

HowtofindIP’sinformationinRAC?

Editthe/etc/hostsfileasshownbelow:

#Donotremovethefollowingline,orvariousprograms

#thatrequiresnetworkfunctionalitywillfail.

127.0.0.1

localhost.localdomainlocalhost

##PublicNodenames

192.168.10.11

node1­pub.hingu.net node1­pub

192.168.10.22

node2­pub.hingu.net node2­pub

##PrivateNetwork(Interconnect)

192.168.0.11

node1­prv

node1­prv

192.168.0.22

node2­prv

node2­prv

##PrivateNetwork(NetworkAreastorage)

192.168.1.11

node1­nas

node1­nas

192.168.1.22

node2­nas

node2­nas

192.168.1.33

nas­server

nas­server

##VirtualIPs

192.168.10.111

node1­vip.hingu.net node1­vip

192.168.10.222

node2­vip.hingu.net node2­vip

WhatisdifferencebetweenRACipaddresses? PublicIPadressisthenormalIPaddresstypicallyusedbyDBAandSAtomanagestorage,systemand database.PublicIPaddressesarereservedfortheInternet. PrivateIPaddressisusedonlyforinternalclusteringprocessing(CacheFusion)(akaasinterconnect).Private IPaddressesarereservedforprivatenetworks. VIPisusedbydatabaseapplicationstoenablefailoverwhenoneclusternodefails.Thepurposeforhaving VIPissoclientconnectioncanbefailovertosurvivingnodesincasethereisfailure Canapplicationdeveloperaccesstheprivateip? No.privateIPaddressisusedonlyforinternalclusteringprocessing(CacheFusion)(akaasinterconnect)

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

WhatisRAC?

RACArchitechture?

WhatisaSCANListener?

WhatisVIP?

WhatisTAF?

WhatisFAN?

WhatisLMON?

WhatisCACHEFUSION?

WhatisSPLITBRAINinRAC?

HowLoadbalancingworksinORACLERAC?

WhatisVotingDisk?

HowmanybackupsarethereforVotingDisk?

WHYODDNUMBEROFVOTINGDISKISUSED?

HowtotakeVotingDiskbackup?DoyoutakeVotingDiskbackup?

IfyoulostVotingDisk,howdoyouRestore?

WhatisOCR?

HowmanybackupsarethereforOCR? HowtotakeOCRbackup?DoyoutakeOCRbackup? Ifyoulost OCR,howdoyouRestore?

WhatisaMasterNode?

HowdoyouknowwhichistheMasterNodewithoutconnectingtoDatabase?

CanwehaveNode1inSOLARISOSandNode2inLINUXOS?

CommomnlyusedcommandsinRAC?

HowtoconvertstandalonedatabasetoRAC?

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­