Accessing SQL Server from windows service -
I am trying to add SQL Server from a Windows service. Now my Windows service is installed in different systems. Now how can I connect if I want to connect to my SQL server? I am able to connect if I add the related system user ID to the SQL Server login user, I do not think this is the correct way .. Because I need to install the window service in different systems, Need to add in
I think you are using InstallUtil to install the service. You must configure the service to run under the domain account. Let's call it in your Dain \ WindowsSecondadman account
In the connection string, use the tag INTEGRATED SECURITY = SSPI
On SQL Server, create a login YourDomain \ WindowsServiceDomanAccount and assign it to the appropriate Provide permissions.
You must be configured for a remote connection to allow a non-local connection.
Comments
Post a Comment