SQL Server 2025 Jobs

  • Hello

    SQL Server 2022 16.0.4212.1 running on a Windows Server 2025 Std,V 24H2, SO OS build 26100.6584.

    SQL Agent service account: NT Service\SQLSERVERAGENT

    I have a series of jobs whose steps call SP of the same database.

    One of them scheduled to run at a specific time fails: "Job failed. The job was invoked by Schedule 9 (06:00 xxxxx). The last step to execute was step 0 (no steps ran)."

    Job steps: exec SP_01

    GO

    EXEC SP_02

    But if I run it manually, it runs without problems. Can anyone help me?

    Thank in advanced

  • Check the job history. That'll probably tell you what's wrong. BUT as a guess, does your SQL Agent service account have permission to run that SP?

    I would recommend changing the service account to be a domain account so it can access domain resources. Plus better password management and easier to debug issues and assign permissions to resources. On top of that, if you need to migrate to a new server, there should be no need to adjust permissions or anything - the domain account can retain the same SID when you migrate (if you do it right) whereas anything local to that machine will need to get a new SID and thus the user-login mapping will break and need to be recreated.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Hello

    About the account of the sql server agent  service

    .. We have a series of jobs running. Another one, whose only step call another procedure created on the same database and runs without problems.

    I'll run some tests this weekend. I'll share something on Monday.

    Best regards

  • My opinion - it is LIKELY related to the job not having access to the stored procedure, but the logs will be the best way to tell what went wrong.

    If there are other jobs running fine, I'd be a bit hesitant to change the service account until you are certain nothing will break. It is always hard to get things changed when it is working.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

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

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