views:

27

answers:

1

I'm just a beginner in SQL Server database development and was wondering which authentication method to use. My database needs to have the simplest protection there is.

If I choose Windows authentication, what username and password do I pass when connecting to the database? What will happen when another user installs the application on his computer with different credentials?

I'm real beginner, so please excuse me if I'm asking the obvious.

+1  A: 

If I choose Windows authentication, what username and password do I pass when connecting to the database?

You use the domain login & password for the profile you wish to connect to the database as.

What will happen when another user installs the application on his computer with different credentials?

Depends on how you setup the domain account/role association with the SQL Server role/permissions. Assuming same AD groups, there shouldn't be an issue. This is why you should grant to a role, rather than specific users.

OMG Ponies
What I really need is that the user who installs the application does not need to enter any credentials whatsoever. Only the application should be able to communicate with the database without any configuration (the database would exist in the same folder as executable). That user might be a home user who does not belong to any network. Is this possible to achieve? How?
Witchunter
@Witchunter: That would require a SQL Server Login, but is highly insecure because it means leaving a port open to traffic. Mixed mode supports both Windows/AD authentication and SQL Server logins...
OMG Ponies
Thank you very much.
Witchunter