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?
Asked
Active
Viewed 8,674 times
2 Answers
5
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.
Waqar
- 758
- 4
- 15
1
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
-
The option 3 works for me while using a T4 template and SMO. Thank you. – John Prado Dec 03 '18 at 19:06