Job appears to run successfully, but doesn't.

  • I am trying to get a job to run successfully and have it scheduled in sql server agent.

    The job will run correctly one time, and then after that, the only way to get it to run is to run the proc manually.

    The job will say that it runs successfully, but when viewing the job history, I get the message " executed as user: NT AUTHORITY\SYSTEM. No Records to process at 2011-03-04 20:00:00.117. [SQLSTATE 01000] [Message 50000]. Tje step succeeded."

    When the job works correctly, I will get the same message as above except that it will say xxxx records processed instead of No Records to process.

    I'm not sure what the SQLSTATE and Message numbers refer to.

    Thanks for any help.

    -Steve

  • The state and message are just standard SQL completion codes. Nothing special there.

    I suspect the logic in your job step isn't correct for subsequent runs.

  • I looked at the job step, (only one) EXEC te_input_accrual_ultipro_jackson. This is a T-SQL and it looks to run a stored procedure I believe. Could the logic in the stored procedure be flawed? Or could this be trying to access a locked record in use by another job running?

    I'm not understanding why this job would work 90% of the time, but the other 10% or so it tells me no records found.

  • That's a stored procedure. The logic could be flawed.

  • I agree with Steve. It sounds like the code is missing something or deliberately excluding something.

    Do a search in the catalog views for a proc with that name, then pull up the text of that proc. Test it SSMS to see where it's falling apart.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 5 posts - 1 through 5 (of 5 total)

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