Windows Service Acessing SQL Server

G

Guest

Hi

I have Windows Service which does particular, depending on which i want to
update the SQL Sever table.

Can access Sql Server from Windows services, if so then how to do it?

thanks in advance
 
M

Mohamoss

Hi
A simple strait forward answer would be . Give the user account that your
service run Under access to your SQL server database.
What you need to do is to check what credential that your service run
under . And you can make it run with the credentials of a specific user
(from Administrative tools ' services ' rightclick your service '
properties ' logon tab ' this account ) then enter the user name and
password of this windows account .
In SQL server , what you need to do is to select your database ' users
Then add that user ( of the service ) to the users of your databases and
give him the relative permissions
Hope that helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top