Job Schedule

  • I have scheduled the job as per the following requirement. When I click start job, the job does not run. Please advise..

    thank you in advance.

    Requirement:

    1. Check if there are records avaialble to be sent

    SELECT

    2.If there are not records

    send an email notifying that there were no records

    3. If there are records, run the following stored procedures in orders

    1.exec ..

    2. exec ..

    3. exec

    4. exec

    -- Send an email

    5. select

  • Do you get any error message? If so, which one?

    Did you try to right-click at the job and view history to see if it ever started?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • I don't see anything in history. what should be my next step?

  • Do you get any error message? If so, which one?

    And are you sure you really started the job?

    Are there any steps inside the job?

    Next step would be:

    In Object Explorer: Right click the job -> Start job at step... -> Wait for result.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • I started job. It keeps running and running but doesn't really complete the job. I don't see any error as well.

  • Double click Job Activity Monitor in the Object Explorer pane.

    What's the status of the job in question?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • the status is idle..

  • Now you should see an entry in view history. What's the status (failed or success, and if failed, what message?)



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • the status is failed..

  • wannalearn (11/22/2010)


    the status is failed..

    hmm.. let me quote from my previous post:

    ...if failed, what message?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • The status is in progress but it is continously trying to run the job for last 2 minutes.

  • wannalearn (11/22/2010)


    The status is in progress but it is continously trying to run the job for last 2 minutes.

    vs. previous post

    wannalearn (11/22/2010)


    the status is failed..

    Please tell us the error message captured by the SQL Agent for the failed job.

    It would also help if we could talk about a consistent status of the job...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thanks for your patience.

    Since it didn't run so i had to cancel the job so it stopped after that. The error msg is "Execution of job ' ' failed. See history log for details."

  • Ok, let's start at the very beginning:

    How long does it take to run the code in SSMS that is called within the job?

    If it consists of independed code blocks: How long does each block run separately?

    Reason for asking:

    It might not be an issue with the SQL Agent at all but rather with the code called within...

    So, the first thing to verify would be if the code runs at all using SSMS (Management Studio).



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thank you Lutz for your guidance. I am still trying to figure out if it is code or sql server agent. You indeed pointed me in right direction. I will update you once this issue is resolved.

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply