What is a Trusted Connection?
Asked Answered
F

2

79

What is a trusted connection in terms of SQL Server 2005 (Trusted vs Windows Auth)?

Frugal answered 9/8, 2009 at 3:54 Comment(2)
For google travellers, format of conn string is <add name="MyDbConn1"connectionString="Server=MyServer;Database=MyDb;Trusted_Connection=Yes;"/>Stipel
@Stipel also connectionstrings.com is very handyElbaelbart
A
79

A trusted connection is the same thing as using Windows Authentication in SQL Server 2005. Authentication is done by the domain, and authorization is handled by SQL Server.

SQL Server can also use its own logins, such as the sa user. These are both authenticated and authorized by SQL Server. They are only viable if SQL Server is run in Mixed Authentication Mode.

MSDN has a good article about choosing the right Authentication Mode. It's a good primer.

Adelia answered 9/8, 2009 at 3:57 Comment(1)
@Mitch: My highest voted answer ever is that difference. How sad is that? #1045607Adelia
C
19

A Trusted connection means Windows Authentication (i.e. a Windows login).

SQL Server has two Authentication modes: Mixed and Windows Authentication Mode.

Mixed has the option of SQL server logins (username and password) and Windows Authentication.

Coachwork answered 9/8, 2009 at 3:57 Comment(2)
so trusted connection is based on windows logon id?Frugal
Yes. Trusted loosely means "windows logins".Aniakudo

© 2022 - 2024 — McMap. All rights reserved.