Documente Academic
Documente Profesional
Documente Cultură
11gR2RAC:WhySCAN&NodeListenersin11gRACORACLEINFO
OracleRAC:Nodeevictions&11gR2node
evictionmeansrestartofclusterstacknotrebootof
node
Thankyou!MerryChristmas&HappyNewYear
11gR2RAC:WhySCAN&NodeListenersin11gRAC
Hello,
Alongnotes(confusing)onlistenersin11gR2RAC.
YouallawareofwehavetwolistenersrunningindatabaseserversinGridInfrastructure(AkaRAC)namelyscanlisteners
andnodelisteners.
Howdoestheywork?
TheSCANworksbybeingabletoresolvetomultipleIPaddressesreflectingmultiplelistenersintheclusterhandling
publicclientconnections.Whenaclientsubmitsarequest,theSCANlistenerlisteningonaSCANIPaddressandthe
SCANportiscontractedonaclientsbehalf.BecauseallservicesontheclusterareregisteredwiththeSCANlistener,
theSCANlistenerreplieswiththeaddressofthelocallistenerontheleastloadednodewheretheserviceiscurrently
beingoffered.Finally,theclientestablishesconnectiontotheservicethroughthelisteneronthenodewhereserviceis
offered.Alloftheseactionstakeplacetransparentlytotheclientwithoutanyexplicitconfigurationrequiredintheclient.
Apicturecansave100wordsofexplanation
Wehave3scanlisteners,registeringtheIPC(TCP)endpointsastheRACinstances(remote_listener)
registeredwithPMONofracinstancesandthePMONalsoregisterstonodelisteners(local_listener)which
actuallypointstoyourdatabase.
Indeedtheybothrunfromthesamehome(GridHome),butfordifferentfunctionality.From11gR2onwardsthese
listenersarepartofclusterwareandmanagedbyoraagent.Thisoraagenttakecareoflisteners.Thisoraagent
spawnedbycrsdtakescareofourlistenersintermsofconfigurationandmonitoring.
Especiallywhenthelistenerisstartedbyoraagentyoucanseethelinesinthelistener.orafile#lineaddedby
agent.
Anotherimportantaspectofthelistener.orafilesarethesefilesaremanagedbyoraagent,wheneverthereisa
clusterwarecommandisusedtomanagethislisteners.forexamplesrvctletc.
Further,thelistenerswillbemonitoredbyoraagentprocessevery60seconds,whichyoucanfindinthe
$GRID_HOME/log/nodename}/agent/crsd/oraagent_oracle/oraagent_oracle.log
Youmustsetthelocal_listenerandremote_listenerparametertoscanlistener,descriptionoraddresslistofthe
same.Sincetheseistheonlywaynowtoregisteryourdatabase/instancetoscanlistener.Evenifyoudontspecify
theoraagentwillautomaticallyaddlocal_listenervalues,butyoumustexclusivelysetremote_listenerparameterto
clusterscannamewhichwillprovideyoutheTAF.
http://oracleinfo.com/2012/12/27/11gr2racwhyscannodelistenersin11grac/
1/5
7/24/2015
11gR2RAC:WhySCAN&NodeListenersin11gRACORACLEINFO
Forexample,
Ifyoudeletethelistener.oraandrestartthelistenerwithsrvctlstartlistener,alistener.orawillreappear.Theoriginal
configurationwillreappearinlistener.oraandthemanuallymodifiedlistener.orawillberenamed(withatimestampsuffix)
Theagentalsocreatesandmaintainsthefile:endpoints_listener.orathisfileisthereforbackwardcompatibility,
Oraagentcomesintoactionalsoatinstancestartup,whentheinstanceisstartedwithsrvctl(asopposedto
manuallystartedinstancefromsqlplus)andsetsLOCAL_LISTENERparameter,dynamically(thisisdonewithan
altersystemcommandandonlyiftheparameterhasnotbeensetonspfile).
Youmayalsohasobservedinlistener.orafiletherewerenotcp/ipsettings,WherearetheTCP/IPsettingsofmylisteners
inlistener.ora?andOnlyIPCendpointsarelistedinlistener.ora,Asyouseebelowthelistener.oracontainsonlyscan
listenerwhichcontainIPCprotocol
Notes:Beforeproceedfurther
Whatisdynamiclisteningendpoint?
dynamiclisteningendpoint=theaddressorconnectionpointtothelistener.Themostknownendpointin
theoracleDBworldbeingTCP,port1521.
OraagentconnectstothelistenerviaIPCandactivatestheTCP(TCPS,etc)endpointsas
specifiedintheclusterwareconfiguration
ExampleListener.orasettings:
[oracle@rac1]$cat/u01/app/11.2.0.2/grid/network/admin/listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))#lineaddedbyAgent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3))))#lineaddedby
Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2))))#lineaddedby
Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))#lineaddedby
Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON#lineaddedbyAgent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON#lineaddedbyAgent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON#lineaddedbyAgent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON#lineaddedbyAgent
WALLET_LOCATION=
(SOURCE=
(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=/u01/app/11.2.0.2/grid/network/admin/cost)
)
)
SoherenoSID,noPort,nohostaddressconfigured,thisisduetothesettingswholemanagedintheclusterware.
SCANListenershasanendpointstothescanlistenersinendpoint_listener.oraviaIPCorTCPlookslike.
endpoints_listener.ora
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=strac201avip)(PORT=1522))
(ADDRESS=(PROTOCOL=TCP)(HOST=172.24.21.89)(PORT=1522)(IP=FIRST))))#lineaddedbyAgent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=strac201avip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=172.24.21.89)(PORT=1521)(IP=FIRST))))#lineaddedbyAgent
tnsnames.ora
http://oracleinfo.com/2012/12/27/11gr2racwhyscannodelistenersin11grac/
2/5
7/24/2015
11gR2RAC:WhySCAN&NodeListenersin11gRACORACLEINFO
MYDB1522=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=strac201scan.frxntnyc.frx2.com)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=MYDB1522)
)
)
Asyoucanseethelistener.orafilespointstoIPCscanlistenersendpointsofvip/hostnamesinendpoint_listener.oraand
oncetheselistenersstarted,thedatabasepmonregistersthesid/servicestothislisteners(seepictureabove)asper
tnsentriesorthelocal_listenerparameter,thepmonregistertobothnodeandscanlisteners.
Forexample,
Whenyoujuststartalistener,
$GRID_HOME/bin/lsnrctlstoplistener$GRID_HOME/bin/lsnrctlstartlistener
ThiscommandstartsonlyIPCendpoint
Howeveroraagentispostedatlistenerstartupandmakesactivetherestoftheendpoints(notablylisteningontheTCP
port),thiscanbeseenforexamplebyrunningthefollowingafewsecondsafterlistenerrestart:$GRID_HOME/bin/lsnrctl
statuslistener(whichwilllistalltheactiveendpoints),theactiveendpointsareinfactthedatabaseinstances.Thisis
possibleduetothelistener.oraparameteryouusuallysee
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_{LISTENER_NAME}=ON
Anothercheck,
whenyoudisabletheENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=OFFinlistener.ora
andmanuallystopthelistener(manuallymeansnotusingsrvctl)
$GRID_HOME/bin/lsnrctlstoplistener
$GRID_HOME/bin/lsnrctlstartlistener
Whenyouchecklistener.oraandcheckthattheparametereditedabovehasnotchanged,thatisinthiscasetheTCP
endpointwillnotbestarted,thatisthelistenerwillbelisteningonlyonIPC.
Checkwith:$GRID_HOME/bin/lsnrctlstatuslistener
Ifwetrydothesameexercisebystoppingandstartingthelistenerwithsrvctl,asitwouldbethetypicalwaytodo
it,wewillseethattheparameterENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERinlistener.orawillbeset
againtoON.
Now,moraleofthepost,
Always,usesrvctltoaddlisteners,stop,start
AndAlways,Usesrvctltostartinstances/dbasitsetthelocal_listenersparameterautomaticallytoendpoints.
Sothatthelistener.orafilemanagespromptly/neatlybyoraagentprocess.
Thanks
Suresh
http://oracleinfo.com/2012/12/27/11gr2racwhyscannodelistenersin11grac/
3/5
7/24/2015
11gR2RAC:WhySCAN&NodeListenersin11gRACORACLEINFO
Rs.150.ComatGoDaddy.com!
Sharethis:
Share
Google+
SureshPamidimarri
Likethis:
Like
Share
5
Follow
17
Loading...
December27th,2012|Tags:11gr2raclisteners,node_listeners,scan_listeners.wherearetcpsettingsinlistener.ora|Category:
GridInfrastructure
5commentsto11gR2RAC:WhySCAN&NodeListenersin11gRAC
Zola
May23,2013at6:10pmReply
Excellentarticle.ItisforthefirsttimethatIgetaclearexplanationastowhyitisadvisabletoalwaysuse
srvctlcommands.
ketandba
May24,2013at7:41pmReply
Thanksforvisitingandappreciateyourfeedback.
Regards
Suresh
Bhim
July4,2013at10:01pmReply
Reallynice!
Thanks
Bhim
ketandba
July5,2013at9:49amReply
Bhim,
Thanksforcommenting.
Suresh
DeepakKumar
July16,2013at10:00pmReply
HiSir,
Youhaveagreatinfo.IamnewtoOracle.
Thanks
Deepak
http://oracleinfo.com/2012/12/27/11gr2racwhyscannodelistenersin11grac/
4/5
7/24/2015
11gR2RAC:WhySCAN&NodeListenersin11gRACORACLEINFO
http://oracleinfo.com/2012/12/27/11gr2racwhyscannodelistenersin11grac/
5/5