I'm facing with issue of NT Service\SQLSERVERAGENT account on SQL Server 2014 Standard and Window Server 2012R2. Here is my scenario: [b]- Use Database Maintenance Task in SQL Server to create a backup job [/b]+ Step 1: use Database Integrity Component + Step 2: use Database Backup componentSQL job is running with SQL Agent Service Account (NT Service\SQLSERVERAGENT) and I seen that Step 1 is always failed with error message [b]Alter failed for Server '<SQLServerInstance>'[/b]. As I know, Database Integrity Component runs statement DBCC CHECKDB and it requires a snapshot database or EX lock on my database. To create a snapshot database, this account must have at least READ right on folder of SQLServer Data Files but it's still failed after I configured this.I tried to run DBCC CHECKDB TABLOCK, it raised error message[code="sql"]Msg 5030, Level 16, State 12, Line 1The database could not be exclusively locked to perform the operation.Msg 7926, Level 16, State 1, Line 1[/code]I also understand that to run this I have to set my database to mode SINGLE_USER but I do not want to do that because some back-end processes are still working on it at the same time.Many thanks for advice.
↧