HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlModerate

How can I fix "Login failed for user sa" error in SQL Server?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
fixcanerrorsqluserloginforfailedhowserver

Problem

I can access my databases through SQL Server Management Studio (SSMS) by using my Windows account no problem.

I have two issues though:

-
I want to enable sa and then try to log in using sa and the password. I get this error:

I enabled the SQL Server authentication:

-
I tried to create a new user, but that user cannot connect either:

How can I fix this?

Solution

In SSMS, right-click on the server and go to Properties and under the security page, check what Server authentication looks like. Odds are it's set to Windows Authentication only and needs to change if you want to use SQL Server users:

Context

StackExchange Database Administrators Q#290766, answer score: 15

Revisions (0)

No revisions yet.