I am running Hallengren's IntegrityChecks job which fails with the following error:

CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'T:\SQL_Data\Example.mdf_MSSQL_DBCC9'.

SQL Server Agent service account is NT Service\SQLAgent$INSTANCENAME, which has full access to the T drive including all sub folders.

Any idea how to overcome this?


1 Answer 1


SQL Server Agent will schedule a job and cause it to be run by the SQL Server service - the database engine. The account which is trying to create this snapshot for your CHECKDB to be run concurrently with users in it is not the Agent service, but the SQL Server service. So look to see who your SQL Server service is running as and what permissions that account has.

  • 1
    This worked and the job now succeeds - thank you :)
    – jack
    Oct 9, 2019 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.