sql job

  • 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?

  • Try running profiler at the time when this job gets called up and see from where request is arriving at this server.

    Manu

  • 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]

  • 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?

  • 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]

  • this step will call job on another server

    EXEC servername.msdb.dbo.sp_jobname 'jobname'

  • 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]

  • 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

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • Thankyou all

  • 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]

  • 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...

  • 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