Sample Header Ad - 728x90

Which authentication is better for MS-SQL Server 2019 : integrated security=SSPI vs uid=sa;pwd=xx | windows auth vs sa auth

1 vote
1 answer
2899 views
In my different web applications I use both ways, however, I would like to learn which method is better: 1: server=localhost;database=x; integrated security=SSPI;persist security info=False; Trusted_Connection=Yes; 2: server=localhost;database=x;uid=sa;pwd=y; In my web application, for each database query, I open a connection and then close the connection. So I am pretty much using the regular style such as: using (SqlConnection connection = new SqlConnection(srConnectionString)) { connection.Open(); using (SqlDataAdapter DA = new SqlDataAdapter(strQuery, connection)) { DA.Fill(dSet); } } You can safely assume that there are hundreds or even thousands of queries at any given second. My questions: Are there any performance wise difference between 2 authentication methodology? Are there any security difference between 2 authentication methodology? I don't allow remote connections to the SQL Server. So only local connections are allowed. Operating system Windows Server 2019
Asked by Furkan Gözükara (553 rep)
May 8, 2021, 08:52 PM
Last activity: May 13, 2021, 10:39 AM