SQL 2017 Scheduled Maintenance Plan job

kescott 21 Reputation points
2020-08-29T15:45:09.28+00:00

I created a reoccurring scheduled SQL maintenance job with my login account (myNetwork\myUsername) but the it fails each time. The Windows Application log states that the following:

SQL Server Scheduled Job 'MaintenancePlan_FULL_Backup.Subplan' - Status: Failed - Invoked on: 2020-08-29 11:13:46 - Message: The job failed . Unable to determine if the owner (myNetwork\myUsername) of job MaintenancePlan_FULL_Backup.Subplan has server access (reason: Could not obtain information about Windows NT group/user 'myNetwork\myUsername' error code 0x5. [SQLSTATE 42000] (Error 15404)).

All the databases are owned by default SQL Administrator account 'sa'. I changed the job ownership from (myNetwork\myUsername) to (sa). Restarting the job, it completes successfully. How do configure SQL 2017 Server to allow my account (myNetwork\myUsername) privilege to run as 'sa'?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,013 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 112.7K Reputation points MVP
    2020-08-29T19:07:04.687+00:00

    Error code 0x5 is "Access is denied" and this is a Windows error. The problem is that the service account for SQL Server Agent does not have sufficient permissions in the AD on your login.

    You need to work with you AD admin to resolve this.

    1 person found this answer helpful.
    0 comments No comments

  2. Cris Zhan-MSFT 6,636 Reputation points
    2020-08-31T02:31:42.447+00:00

    Hi kescott,

    I can reproduce this problem. After changing the account of SQL Server Agent to an appropriate domain account, the maintenance plan job can be executed successfully.

    Active Directory is refusing access to your SQL Agent.
    https://stackoverflow.com/questions/1234570/could-not-obtain-information-about-windows-nt-group-user

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.