1

I used the Maintenance Plan Wizard under SQL Server 2014 to create a simple maintenance plan that once a week:

  1. Check Database Integrity including indexes
  2. Rebuild Indexes
  3. Clean Up History

When the job I get below error message. Any ideas why it is failing? I did check and NT SERVICE\SQLSERVERAGENT is a member of the sysadmin group as it should be

Executed as user: NT SERVICE\SQLSERVERAGENT. ...2 01:01:31.89
Source: Check Database Integrity Executing query "USE [vc2] ".: 50% complete End Progress Error: 2016-05-12 01:01:51.89 Code: 0xC002F210 Source: Check Database Integrity Execute SQL Task
Description: Executing the query "DBCC CHECKDB(N'vc2') WITH NO_INFOMSGS " failed with the following error: "A database snapshot cannot be created because it failed to start. A database snapshot cannot be created because it failed to start. CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'E:\vc2.mdf_MSSQL_DBCC29'. The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline. The database could not be exclusively locked to perform the operation. Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

  • It looks to be a permission issue. Make sure your SQL server and SQL agent account has FULL access to E:\ drive on server. – SQLPRODDBA May 12 '16 at 12:46
  • The process is failing to create snapshot on` E:\ drive` which is root of drive , plus it seems like the SQL Server service account does not have permission on E drive. Can you check that. I can feel you have created database on root of the folder. – Shanky May 12 '16 at 13:00

Your Answer

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

Browse other questions tagged or ask your own question.