Sunday, September 18, 2005

How to Grant Access to SQL Server for the Network service account

To grant access to SQL Server for the network service account:
  • Create a SQL login for the Network Service account. The name appears as domainName\$ if your database is on a separate server. You can use Enterprise Manager or run the following SQL statement to create the SQL Login:
    exec sp_grantlogin [domainName\$]
  • Create a database user in the required database and map the login to the database user. Or you can run the following SQL statement:
    exec sp_grantdbaccess [domainName\$]
  • Place the database user in a database role.
  • Grant permissions to the role. Ideally, just grant execute permissions to selected stored procedures and provide no direct table access.

Within the client application, use a connection string that contains either "Trusted_Connection=Yes" or "Integrated Security=SSPI". The two strings are equivalent.

Adopted from http://msdn.microsoft.com/library/en-us/dnpag2/html/PAGPractices0001.asp.

0 Comments:

Post a Comment

<< Home