All we need is an easy explanation of the problem, so here it is.
I need to give the NT SERVICE\MSSQLSERVER account permissions on a folder to be able to move and rename some files. I’m getting an access denied error. From the SQL Configuration tool, the services is set up like the below image. What else has to be done to make this appear as a user account?
How to solve :
What else has to be done to make this appear as a user account?
Nothing. And it doesn’t matter what your service account is. The SQL Server service always has privileges assigned to the per-Service SID "NT Service\MSSQLSERVER".
If the files are on the SQL Server, just add permissions for this account:
And if the files are on a remote share, give the permissions to the machine account instead, eg
I was able to sort out the problem. Apparently the server name was changed after SQL Server was installed. We had to update the server name.
SELECT @@SERVERNAME AS 'Server Name' – showed the old server name. We ran the following to update the DNS in SQL server:
sp_dropserver 'OLD-SERVER-NAME'; GO sp_addserver 'NEW-SERVER-NAME', local; GO
After which we restarted the DB server and verified that the name was correct.
After this, I could then pick the new server name as the location for checking for user accounts and with that location selected, the system was able to see the MSSQLSERVER and SQLSERVERAGENT virtual user accounts, and have them added to directory permissions.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂