Job Fails in SqlAgent but Runs in QA.

  • Hi.

    Got an issue thats winding me up, especially as I feel sure I have got around it before...

    I have a proc that executes some code in a loop.  The proc runs fine, and executes in qa, throwing up lots of errors but still working its way through.   However when I run it as an agent job, the job bins out as soon as the first error is thrown.

    Is there some way I am not thinking of to make the job ignore the error and continue through?

     

    Cheers,

    Rich

  • What are error messages? Is it because of account?

  • Job 'Log Restore' : Step 1, 'Log Restore' : Began Executing 2006-11-09 05:00:00

    Msg 4326, Sev 16: The log in this backup set terminates at LSN 247596000002146900001, which is too early to apply to the database. A more recent log backup that includes LSN 247622000001212200001 can be restored. [SQLSTATE 42000]

    Msg 3013, Sev 16: RESTORE LOG is terminating abnormally. [SQLSTATE 42000]

     
     
     
    When I exec the proc it raises the error but doesn't abort the batch... I am pretty sure I have done this before with SQLAgent, but having a problem now.  Is it some setting like xact abort?
     
     
     
  • Ok, I gather SSQL Agent terminates on errors over severity 10.  So I have stuck the command in a cmdshell call to osql.

     

    Seems to work.

Viewing 4 posts - 1 through 3 (of 3 total)

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