Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Maintenance Plan job failing with access denied for NT SERVICE\SQLSERVERAGENT

$
0
0
I used the Maintenance Plan Wizard under SQL2014 to create a simple maintenance plan that once a week:

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

When the job runs this is the 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.

Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>