0% found this document useful (0 votes)
204 views5 pages

11gr2 Rac - Why Scan & Node Listeners in 11grac Oracle-Info

The document discusses the roles of SCAN listeners and node listeners in an Oracle RAC 11gR2 environment. SCAN listeners handle public client connections and direct clients to the least-loaded node providing the requested service. Node listeners run on each database server and register instances with SCAN listeners. Oraagent manages and monitors both listener types. It activates TCP endpoints for SCAN listeners and sets the LOCAL_LISTENER parameter for instances. Administrators are advised to always use srvctl to control listeners and instances to ensure proper oraagent configuration.

Uploaded by

Praveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
204 views5 pages

11gr2 Rac - Why Scan & Node Listeners in 11grac Oracle-Info

The document discusses the roles of SCAN listeners and node listeners in an Oracle RAC 11gR2 environment. SCAN listeners handle public client connections and direct clients to the least-loaded node providing the requested service. Node listeners run on each database server and register instances with SCAN listeners. Oraagent manages and monitors both listener types. It activates TCP endpoints for SCAN listeners and sets the LOCAL_LISTENER parameter for instances. Administrators are advised to always use srvctl to control listeners and instances to ensure proper oraagent configuration.

Uploaded by

Praveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

7/24/2015

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

You might also like