I am using SQL Server 2012 and have created a Maintenance Plan to backup user databases nightly to a folder on the hard drive. However, when this plan is executed it fails with an "Access is denied" error.

Here are the details:

  1. I created a Maintenance Plan, adding a "Back Up Database Task" task that backs up all user databases.
  2. I verified that the plan is set to run as "SQL Server Agent service account"
  3. When I go to SQL Server Configuration Manager and view the Properties fo rthe SQL Server Agent under the Log On tab it shows the NT Service\SQLSERVERAGENT as the account being used for this service.
  4. I created a folder on the hard drive to store these backups named C:\SQLBackups and gave full control to the NT Service\SQLSERVERAGENT account
  5. I configured the Maintenance Plan in Step 1 to store to C:\SQLBackups, creating subfolders for each database.

When I run the Maintenance Plan I get the following error:

Executing the query "EXECUTE master.dbo.xp_create_subdir N'C:\SQLBackup..." failed with the following error: "xp_create_subdir() returned error 5, 'Access is denied.'". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

If I grant Everyone full access to the C:\SQLBackups folder then the Maintenance Plan runs without issue.

What accounts must have access to this folder for the backup to work? I presumed I'd only need to grant access to the NT Service\SQLSERVERAGENT account, but clearly that is not working.


2 Answers 2



I needed to give permissions on the folder to the NT SERVICE\MSSQLSERVER account, as well.

  • I was able to get backups to work with adding permissions for only this account. I did not need to add any of the other accounts listed in the OP's question.
    – Sam
    Jan 22, 2015 at 12:40

Yet you can give permission to group "Authenticated Users" - it worked in my case - Windows Server Domain infrastructure

  • Evgeny, good suggestion! After many days trying to discover, give permission to group "Authenticated Users", solved my problem! Great! Thanks.
    – user372190
    Aug 24, 2016 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .