December 31, 2008 at 12:30 pm
Hi,
we have 100 's of jobs in a server and one of the job is not scheduled but it is called from other job(same server job or from different server job).
My question is How can I find which job is calling my JOB? ..
Is there anyproc like SP_Depends?
December 31, 2008 at 12:43 pm
Try running profiler at the time when this job gets called up and see from where request is arriving at this server.
Manu
December 31, 2008 at 12:44 pm
How are you "calling" one job from another?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
December 31, 2008 at 1:15 pm
In order to run one job from another both the servers should be linked servers .Then we can run the job from another server.
Is there any other way except running sql profiler trace?
December 31, 2008 at 1:26 pm
kiransuram19 (12/31/2008)
In order to run one job from another both the servers should be linked servers .Then we can run the job from another server.
Yes, how are you doing this? What kind of Job & Step is it? What is the command?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
December 31, 2008 at 1:32 pm
this step will call job on another server
EXEC servername.msdb.dbo.sp_jobname 'jobname'
December 31, 2008 at 1:52 pm
Then search for that command in msdb.dbo.sysjobsteps of the calling server.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 1, 2009 at 12:22 am
kiransuram19 (12/31/2008)
Hi,we have 100 's of jobs in a server and one of the job is not scheduled but it is called from other job(same server job or from different server job).
My question is How can I find which job is calling my JOB? ..
Is there anyproc like SP_Depends?
Yes if job is callled by sp.
then u can find by
select distinct object_name(id) from sys.syscomments where text like '%JobName%'
or u can from
select * from msdb..sysjobsteps
January 1, 2009 at 12:28 am
Thankyou all
January 1, 2009 at 10:58 am
Glad we could help.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 5, 2009 at 3:22 am
kiransuram19 (12/31/2008)
In order to run one job from another both the servers should be linked servers .Then we can run the job from another server.
Actually one can connect to another sql server by running osql tool from within the xp_cmdshell procedure execution on the first server...
January 5, 2009 at 7:47 am
aledochowski (1/5/2009)
kiransuram19 (12/31/2008)
In order to run one job from another both the servers should be linked servers .Then we can run the job from another server.Actually one can connect to another sql server by running osql tool from within the xp_cmdshell procedure execution on the first server...
While you can do this, you will lose distributed transaction control and will have to use manual methods to detect and coordinate a failure/rollback of the remote transaction with any local transactions.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply