[英]Connection to SQL Server using Windows Authentication from an application started as service
MSSQL server is running with Windows and SQL Server Authentication mode on a server called 'HOST1'. MSSQL服务器在名为“ HOST1”的服务器上以Windows和SQL Server身份验证模式运行。 The application which needs to connect with the SQL Server is started as a service on a server called 'HOST2'.
需要与SQL Server连接的应用程序作为服务在称为“ HOST2”的服务器上启动。 Since the service manager starts applications as the user "NT Authority\\System", I'm unable to connect with the SQL Server on 'HOST1' from 'HOST2'.
由于服务管理器以“ NT Authority \\ System”用户身份启动应用程序,因此无法从“ HOST2”与“ HOST1”上的SQL Server连接。
I have the option of manually changing the user account using which the services are launched. 我可以选择手动更改用于启动服务的用户帐户。 That is,
那是,
Right click service -> properties -> Log On -> Choose 'This Account' -> Provide a user which has permission to connect with SQL Server in 'HOST1'
But the problem is, there will be hundreds of services, running in hundreds of hosts. 但是问题是,将有数百个服务在数百个主机中运行。 Hence modifying the user manually for all services is not possible in my case.
因此,在我的情况下,无法为所有服务手动修改用户。
Please let me know how I can connect to SQL Server. 请让我知道如何连接到SQL Server。
Would using Powershell to script out a solution that is not quite as taxing? 是否会使用Powershell编写出不太费力的解决方案? Maybe as part of the deploy process?
也许是部署过程的一部分?
Powershell script to change service account Powershell脚本来更改服务帐户
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.