Tweeted twitter.com/StackDBAs/status/691873288134467584
2 edited tags
| link
1
source | link

How to run SQL services on NT SERVICE\MSSQLSERVER account if it is running earlier on LocalSystem

Recently just for experimental puprose, I have relocated the default (C:...) data\log file paths in server settings to new location (G:\DBA).

Then I've moved the previously existing db's data\log files to the new location (G:\DBA) and restarted the SQL services. From then, whenever I'm creating DB, it is working as expected i.e., data\log files are getting created in new location(cool...).

But the problem is, I see all my previously existing DBs are in RecoveryPending state also got an error like Access denied. enter image description here Thinking that service account on which SQL is running (NT SERVICE\MSSQLSERVER) is not having access to new location(G:\DBA), I changed the logon account as Local System for SQL services in Computer Management console. Now I see all db's are good. enter image description here

But, I want to run my sql services on NT SERVICE\MSSQLSERVER (default instance) service account. I tried by giving full access to G:\DBA\ for NT SERVICE\MSSQLSERVER, but no use. Please help me what all I have to do if I want to run my SQL services back on NT SERVICE\MSSQLSERVER service account. I'm beginner in this field. Please help me out.

Thanks in advance. . .