How to get SQL Server's Windows Authentication use accounts in a Windows Domain?
Let's say in the office the staff are 开发者_运维问答all using Active Directory for authentication when accessing shared folder, remote control, etc. Now we need to use this same manner to log in SQL Server 2008 but not sure where to get started.
If you are asking through SQL management studio, then on login screen you have a combobox saying what kind of authentication type you want to use. You need to use "Windows Authentication
" option
If you are talking about connection string, then you need to add Integrated Security=true;
in your connection string instead of username and password.
Before users can log in to the SQL Server via Windows Authentication, you will need to be sure that you have granted their Windows accounts access to the SQL Server. Methods for doing this via SQL Server Management Studio and Transact-SQL are documented in Books Online here: http://msdn.microsoft.com/en-us/library/aa337562.aspx.
After you've done this, then - as Sachin indicated in a separate answer - you and your users will need to indicate that they want to log in using Windows Authentication; Sachin has provided instructions for doing so.
精彩评论