Saturday, January 2, 2010

Login failed for user 'SomeUser'. (Microsoft SQL Server, Error: 18456)

You can get the "Login failed for user 'SomeUser'. (Microsoft SQL Server, Error: 18456)" error when you connecting from SQL Server Management Studio for the first time.

To solve the problem right-click on SQL Server Management Studio shortcut and select 'Run as Administrator' and then connect to database.
You can add your windows login under Security/Logins to run the SQL Server Management Studio without 'Run as Administrator' option.