SQL Server Agent Job Errors

  • Hey,

    I was wondering if there is a way to view the error details of a job that failed in the SQL server agent.

    When a job fails I normally check the Job History but all it says there (most of the time) is:

    The Job Failed. The Job was invoked by Schedule....

    So I right click SQl server agent to display the Error Log but it shows no errors matching the execution time have been logged.

    How can find out what went wrong??


  • Go more details by clicking "show step details".

    If job is created by maintenance plan, trun on the reporting by check "write report to text file" in reporting tab.

     

     

  • Thank you Allen!


  • Even without a maintenance plan you can write the job steps to an output log.

  • Yeah, To the Windows Application Event Log....Through the job's properties...


  • Logging to the event log won't give you much information either.  If it's an operating system command (DTSRun) or a T-SQL step, the best way (IMHO) is to use the following steps to log job activity:

    1. Open the job properties

    2. Select the Steps tab

    3. Click the Edit button for the step you want logged

    4.  Click the Advanced tab

    5  Use the Output file text box to select a location for a log file.

    This will give you the most information about what occurred during that step of the job. The only drawback to this is is you have a job with a lot of steps, you have to select an output file for each step.

    Ben

  • Thanx Ben!

    This certain job has one step...


Viewing 7 posts - 1 through 6 (of 6 total)

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