views:

56

answers:

2

Hello,

In response to a question I asked about a week ago I changed our database engine to only accept Windows Authentication instead of SQL Authentication. Because our code runs in a different user context then that of the database connection we need to specify the username and password information in order for us to connect to the database. How do we do this using a ConnectionString? Remember, we are not using SQL Authentication anymore.

Thanks,

+1  A: 

Since you are using only Windows authentication, you can't in the connection string. The calling process will need to impersonate a windows principle (user) with the relevant access permissions.

Mitch Wheat
+1  A: 

On your SQL Server instance, you need to add the domain group under the Security node (the one in the main server group, not in the individual databases). Under that node, the end result would be an item that resembles

<Your Domain>\Domain Users

Then in your application (Windows or Web) connection strings you want to set integrated security to be TRUE, and elsewhere, you need to set Impersonation to also be True. I am being vague here because the methods vary by application type.

Hopefully that sets you on the correct path.

Rob Allen
I still need to specify that the username is I want to impersonate as well. I'm following: http://support.microsoft.com/kb/306158. Thanks!
Phillip