Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Trusted Connection?

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

like image 247
Csharp Avatar asked Aug 09 '09 03:08

Csharp


People also ask

What is trusted connection true?

A trusted connection is used if you're connecting to the database without providing a user name and password. For example, if you are connecting via a Data Source Name, and the DSN contains the user ID you're using to connect, then your trusted connection is true.

What is trusted connection in ODBC?

3.1 Trusted Connection"Database=DatabaseName" specifies that DatabaseName is the name of the data source. "Trusted_Connection=Yes" specifies that a user account<2> is used to establish this connection.

What is a trusted context?

A trusted context is a database object that defines a trust relationship for a connection between the database and an external entity such as an application server. The trust relationship is based upon the following set of attributes: System authorization ID: Represents the user that establishes a database connection.

How do I setup a trusted connection in SQL Server?

Configuring Microsoft SQL Server trusted connections on UNIXProvide the Windows service user name and password in the Microsoft SQL Server connection properties. Select the provider type as ODBC. Select the Use DSN check box. Click OK to create the connection.


2 Answers

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.

like image 50
Eric Avatar answered Oct 03 '22 17:10

Eric


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.

like image 37
Mitch Wheat Avatar answered Oct 03 '22 16:10

Mitch Wheat