Sei sulla pagina 1di 3

9/9/2015

Technology&OtherWorldlyIssues:ODIstartscen.shforkslocalagentforascenario
0

More NextBlog

CreateBlog SignIn

Technology&OtherWorldlyIssues
Wednesday,February23,2011

BlogArchive

ODIstartscen.shforkslocalagentforascenario

2014(1)

Iwilldiscussthebehaviorofodistartscen.sh/batcommand.Often,weusethiscommandto
executeascenariofromourcustomshell/batchscriptsormightevenaddittoourworkflow
engine.
Thesyntaxbeing:
startscen.shscn_load_data001GLOBALNAME=odiSchedAgent001

2011(5)

However,thereisanimportantpointtoknowtheunderlyingfunctioningofthestartscen
command.Thiscommandforksoutanewagentprocessthatislocaltothemachineonwhichthe
commandwasstarted.
Thestartscen.shhasaparameterNAME=<agentName>whichnaturallymakesusassumethat
thisagentwillbeusedtoexecutethescenario.However,thisparameterisjustusedtostorethe
agentnameinthelogsoftheoperator.Ithasnothingtodowithusingthatagenttoexecutethe
scenario.
AnotherobvioussideeffectisthattheOSexecutionprivilegesoftheuserwhoinitiatedthe
startscencommandareusedtogeneratelogfilesoranyotherOSfiles,whichmaybedifferent
fromtheexecutionprivilegesoftheremoteagentthatyouintendedtouse.

2012(1)
December(2)
April(1)
February(2)
ODIstartscen.shforkslocalagentfora
scenario
ODI11gUpgradeissuesSetoperator
disabled
2010(5)
2009(8)
2008(7)

SubscribeTo

Posts

Considerasmalltestcase:

Comments

(1)UseUnixaccount"A"tostartabackgroundagentprocessbyagentscheduler.sh.
MyBlogList

agentscheduler.shPORT=20910NAME=odiSchedAgent001
(2)OnthesameUnixmachine,useUnixaccount"B"toexecutethescenario"scn_load_data"
startscen.sh

EighttoLate
Settingupaninternaldataanalytics
practicesomethoughtsfromawayfarer
6daysago

startscen.shscn_load_data001GLOBALNAME=odiSchedAgent001

CalcuttaChromosome
LittleStoriesoftheLittleRoad

However,instep(2),itwouldforkanewagentprocesstoexecutethescenarioinsteadofusing
theexistingagentprocessstartedin(1).Youcanverifythisbyscanningtheprocesses.
OnUnix,youcancheckthatusing"psef"andseethatanewprocesswouldbeinitiated.

2weeksago

EvenifyouusesameUnixaccount"A"toexecutestartscen.sh,itwouldstillforkanewagent
process.

2yearsago

Thismaybeaproblem.AsIsaidearlierthatthepermissionsoftheuserwhoinitiatedtheagent
vstheuserwhoinitiatedthestartscencommandwoulddiffer.
However,therearemorecasesinwhichthiswillbeaBiggerproblem.
Considerascenarioinwhichyouhave2UnixsystemsSystemAandSystemB.SystemAis
runningtheagentprocessandtheSystemBisbeingusedtokickoffthescenariousing
startscencommand.IfthereareanyOSbasedactivitiesdonebythescenario,thentheywould
bedoneonthefilesystemofSystemB,whereasyouwantedthosetodoneonSystemA(after
allthatswheretheagentisrunning.Orsoyouthought)

6yearsago

NowtheGoodpart...TheSolution:
Usethestartcmd.shinsteadofstartscen.sh
Thesyntaxis

InformationWeekAllStoriesAnd
Blogs
6Office365PowerTips
YetanotherDatabaseBlog
Blogrelocation

Callme

VisitorMap

startcmd.shOdiStartScenSCEN_NAME=scn_load_dataSCEN_VERSION=001CONTEXT=G
LOBALAGENT_CODE=odiSchedAgent001
Thiscommandactuallyusestheremoteagentspecifiedintheparameter.

PostedbyAnkitJainat7:56AM
Reactions:

funny (0)

Labels:agent,odi,process,scenario

interesting (0)

cool (0)

helpful (0)

7comments:
http://askankit.blogspot.in/2011/02/odistartscenshforkslocalagentfor.html

1/3

9/9/2015

Technology&OtherWorldlyIssues:ODIstartscen.shforkslocalagentforascenario
Anonymoussaid...
Veryhelpfulpost.Mostappreciated.
Thankyou.Kudos!!
April8,2011at3:17AM

AnmolKaushiksaid...
Hiblogger,
Thatsthebesticouldgetonagent.However,IwouldliketoknowwhatifIexecutethe
command
startcmd.shOdiStartScenSCEN_NAME=scn_load_dataSCEN_VERSION=001
CONTEXT=GLOBAL
Asyoucannote,Ihaventspecifiedanagent.Sowillthisforkanewlocalagenttoo?
Pleasereplytomeonmyemail
k_anmol1592@hotmail.com
December8,2011at8:27AM

AnkitJainsaid...
Anmol,
Itwoulddonoharmintryingtorunthecommand.
Idontthinkthisisgoingtoexecuteanything.Whatsthelogicbehindnotspecifyingan
agent_code?
Ifyouwanttousethelocalagent,thengowithodistartscen
December8,2011at12:35PM

AnmolKaushiksaid...
HiAnkit,
Thanksalotforyourresponse.
ActuallytheenvironmentIamworkinginisquiterestricted.Ihavebeenaskedtowriteunix
scriptsthatcheckwhetherODIisup(bycheckingifthelocalagentisrunningornot:|)and
thenexecutingthescenariowearetryingtoexecute.Iamnotsurehowtopingalocalagent
fromaUnixCommandline.
Myunderstandingisthateverytimeajobisdispatchedwithalocalagent,anewagent
instancestartsforitsexecution.Alocalagent,unlikeastandalone/scheduleragentisnot
alwaysupandrunning.
PS:Thecommand"startcmd.shOdiStartScenSCEN_NAME=scn_load_data
SCEN_VERSION=001CONTEXT=GLOBAL"
willexecutewithaninternalagentaswearealreadydoingthishere.
December9,2011at4:40AM

AnkitJainsaid...
Yourunderstandingaboutanewinstancebeingcreatedwhileusinglocalagentiscorrect.
However,thereisnothinglikea"localagent"runningallthetime.
So,thisisnotsomethingthatcanbecheckedbypinginginUnixscripts.
ItisonlycreatedwhenyouinvokestartCmdorStartScen.Afterthescenarioscompletes,the
localagentisdestroyedaswell.Thelocalagentisaliveandavailableonlyforthatspecific
session.
ODIisnever"up"byusingalocalagent.TheonlywayODIcanbe"up"isbyusinga
standalone/scheduleragent.Thisisaprocessthatkeepsrunningontheserver.This
processcanbetrackedbypsefandifitsavailable,thenstartcmdcanbeexecuted.
Also,thereisanotherutilinsideODI(OdiPingAgent)tocheckifaparticularagentis
availableornot.
December9,2011at6:51AM

AnmolKaushiksaid...
HiAnkit,
Thanksalot.IconductedaPOConthesocalled'localagent'andcametothesame
conclusion.Alocalisnotaagent.ItissimplyanexecutionunitstartedbyODItoexecutethe
scenario,whichterminateswhenthescenariohasbeenexecuted(successfullyornotdoesnt
matter)
SonowIhaveproposedtocalladummyscenario,usingthe"startcmd.shOdiStartScen"
command.Thisisthebestwaytocheckthe'localagent'andtocheckifallODI
configurationsareintacttohandleanincomingexecutionrequest.
Cheers.
December19,2011at8:38AM

http://askankit.blogspot.in/2011/02/odistartscenshforkslocalagentfor.html

2/3

9/9/2015

Technology&OtherWorldlyIssues:ODIstartscen.shforkslocalagentforascenario
MarcosdeBenedictosaid...
ThanksKudos,veryhelful!
September29,2014at5:58AM
PostaComment

Linkstothispost
CreateaLink
NewerPost

Home

OlderPost

Subscribeto:PostComments(Atom)

Simpletemplate.PoweredbyBlogger.

http://askankit.blogspot.in/2011/02/odistartscenshforkslocalagentfor.html

3/3

Potrebbero piacerti anche