Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot log in using SQL authentication ONLY from a remote server

I am trying to connect to SQL Server 2008 from a remote server using 'sa' username and its password (I can log in normally with this username and password from my own computer - so "SQL Server and Windows authentication mode" is chosen).
In the SQL Server log file on my computer I see this error:

Login failed for user 'sa'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only.

I thought it might be a remote connection problem, so I checked that the remote connection in the properties is enabled, in the configuration manager I enabled TCP/IP and Shared Pipes and restarted the service afterwards and I created a firewall rule for port 1433. I also tried to turn off the firewall in case that it is being blocked somehow, but I got the same error.

How this error appears only when accessing SQL Server from a remote server?
How can I fix it?

like image 906
user990635 Avatar asked Sep 06 '25 03:09

user990635


1 Answers

From the SQL Server management studio, right click on your server (after connect) in the Object Explorer window and choose Properties.

On Security item, make sure that SQL Server And Windows Authentication mode is selected.

enter image description here

like image 60
Stéphane Bebrone Avatar answered Sep 11 '25 00:09

Stéphane Bebrone