开发者

what Windows account should a service run under to access network sql servers

I am considering creating a windows service that would run periodi开发者_Python百科cally and query networked databases and store the information on the local machine (please don’t ask why!). I would like this service to run when there is no one logged on to the computer locally. What account should the service run under Localservice, Localsystem or Network. A username and password would be provided to all networked databases including the local.


I'd probably create a specific domain account and grant that rights to both SQL server and whatever local store you are going to use. If you want to use SQL credentials to connect to the DB, then it could be a local account (with access to the local resources) or a higher privileged user (like LocalSystem).


To guarantee that you can actually connect to the databases, I would suggest that you create a services account (something like /User - and apply a password that doesn't expire).

This way you can set up the user in SQL Server and use integrated security while connecting.

For example:

Domain: stackoverflow Service: SearchDB

I would create a user stackoverflow\SearchDBUser

Basically you don't have to stick to the pre-defined users when setting up the windows service.

I hope this helps.

Wagner.


This might actually be better asked on ServerFault, but I've always seen it as 'Network' or 'Local System' depending on specific usage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜