0

I am wondering what kind of permissions [NT SERVICE\SQLSERVERAGENT] accounts needs to run the job?

Below are the steps that have been impleemented yet the job doesn't run with correct results expected.

a. Assign SQLAgentOperatorRole to [NT SERVICE\SQLSERVERAGENT]

b. Execute rights of SP assigned to [NT SERVICE\SQLSERVERAGENT]

Below are the conditions for the SQL Job that executes Stored Proc

  • Owner as [NT SERVICE\SQLSERVERAGENT] and Run-as user is NT SERVICE\SQLSERVERAGENT then job fails
  • Owner as [NT SERVICE\SQLSERVERAGENT] and Run-as user is blank then job fails
  • Owner as [NT SERVICE\SQLSERVERAGENT] and Run-as user is my login id then job runs perfectly.
  • Owner as blank/sa/any other user and Run-as user is NT SERVICE\SQLSERVERAGENT then job fails

The job does NOT run any error but instead the job runs SP that executes code but inserts lesser records like 150 rows instead of 9000 rows. I am not sure what else can be done. My goal is that the [NT SERVICE\SQLSERVERAGENT] should be able to execute the SP inside SQL Job and my login (as mentioned in Point #3) should be removed.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.