Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what is "Integrated Security" in SQL Connection

hi

what is "Integrated Security" in SQL Connection?
and it must be false or true?

thanks
Posted
Comments
SrikantSahu 4-Dec-14 14:12pm    
When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication.
Recognized values are true, false, yes, no, and sspi (strongly recommended), which is equivalent to true.

For more information, please visit http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx

" Integrated Security
-or-
Trusted_Connection 'false' Whether the connection is to be a secure connection or not. Recognized values are 'true', 'false', and 'sspi', which is equivalent to 'true'.
" -- http://www.connectionstrings.com/all-sql-server-connection-string-keywords/[^]
 
Share this answer
 
Use "integrated security" (or its aliases) when you want to access the database using the user's security token, who owns the current thread or it is impersonated by it. Of course, the thread user needs to be configured to have access to the server, and the server needs to be confgured to accept windows authentication.
Typical use of this approach is when you create a web application under IIS without impersonation. Than the application is running unther the name of the configured application pool user, regardless of the client connected to the application. This way, the application pool user identity can access the appication database without supplying credentials. On the other hand, if you use impersonation in the same scenario, all possible users from the client side has to be added to the sql server security for the application to work.
 
Share this answer
 
If your application runs on a Windows-based intranet, you might be able to use Windows integrated authentication for database access. Integrated security uses the current Windows identity established on the operating system thread to access the SQL Server database. You can then map the Windows identity to a SQL Server database and permissions.
To connect to SQL Server using Windows integrated authentication, you must identify the Windows identity under which your ASP.NET application is running. You must also be sure that the identity has been granted access to the SQL Server database. This topic includes a code example that displays the current Windows identity of the ASP.NET application.

or try ..
https://www.google.co.in/search?q=Integrated+Security+in+sql&oq=Integrated+Security+in+sql&gs_l=serp.3..0i20j0l2j0i22i30l7.335694.339786.0.340128.14.11.1.2.2.1.290.1458.0j4j3.7.0....0...1c.1.58.serp..8.6.786.dyUT-PxOKNU[^]
 
Share this answer
 
v2
To quote MSDN: "Gets or sets a Boolean value that indicates whether User ID and Password are specified in the connection (when false) or whether the current Windows account credentials are used for authentication (when true)." (MSDN[^])

That's from the .NET SqlConnection class property of the same name, but it describes exactly what the Connection string option is and does: it's a bool which tells SQL Server is authentication details are provided in the connection data.
So yes, true and false are the only valid values.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900