I'm trying to grant the NT Service\SQLSERVERAGENT Windows account file system access, based on the marked answer in this question. I believe it's a virtual service account, and it does not show up in the control panel -> user accounts area.
How do I give this service account access to the file system? Specifically, on Windows 7.
I've read several approaches and none seem to be an option for me. I tried a PowerShell approach, but the AD commands were not valid commands. I even downloaded and installed the required windows patch for those commands. I've also read that I should be able to do this via the SQL Server Configuration Manager or the Management Studio. I can't seem to figure out where to adjust these permissions, though.
The SQL Server Agent process fails to start, with the following error message:
Login failed for user 'NT SERVICE\SQLSERVERAGENT'. Reason: Failed to open the explicitly specified database 'msdb'. [CLIENT: <local machine>]
Based on my Googling, it has to do with this account's permissions.
I'm not sure if the database is corrupt, but it says the database is in a Normal status. The SQL Server Agent login is part of the sysadmin and public groups.




NT Service\SQLAgent$MyInstanceNameand trying to set security on a folder and pressing Check Names said Name Not Found and wouldn't find it. After much frustration I realised that the default 'From This Location' when pressing Add to add permissions wasn't set to my local machine, it was set to my domain. Changing it to my local machine (the very root node in the tree) allowed it to detect myNT Service\SQLAgent$MyInstanceNameaccount to add it to the folder permissions. – NibblyPig Oct 09 '18 at 14:47