1

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?

nobody
  • 19,814
  • 17
  • 56
  • 77
Ben
  • 11
  • 1
  • 2

2 Answers2

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
d219
  • 2,707
  • 5
  • 31
  • 36
yido
  • 307
  • 4
  • 16