I just logged in to SQL Server 2005 with SQL Server Authentication but was stuck at the error message saying "Login failed for user ‘sa’, (Microsoft SQL Server, Error: 18456)". What happened to this?
SQL Server Login Failed for User SA
9k Views Asked by Ben At
2
There are 2 best solutions below
1
On
Three things to check if you can't log in to SQL Server using the sa account:
1.Check the password and provide a new one if necessary
sp_password NULL, 'mypassword', 'sa'
2.Enable the sa account
ALTER LOGIN sa ENABLE
3.Check that the sa account is not being affected by the domain security policy
ALTER LOGIN [sa] WITH PASSWORD='yourpassword',CHECK_POLICY=OFF
In SQL Server Management studio right click in Object Explorer and ensure in the server properties - under Security the option "SQL Server and Windows Authentication mode" is enabled
If you are accessing the SQL Box remotely ensure the TCP/IP setting is enabled in SQL Server configuration manager.