Sql-server – Login failed for user ‘domain\username’. (Microsoft SQL Server, Error: 18456)

sql server

I am facing this problem when connecting to local system db, but when I connect any server it connects.

Login failed for user 'domain\username'. (Microsoft SQL Server, Error: 18456)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

Best Answer

Solution by Pinal Dave:

  • Create new user with Administrator privilege with same username and password as of SQL Server 2008 in operating system.
  • On SQL Server database create new user by expanding DatabaseNode >> Security >> Login >> Create New User and add this new user with Windows Authentication radio button selected. This user can be only added by selected Windows Authentication it is Operating system’s User Login. Once above.you should perform the above steps using windows authentication

Also see http://bjtechnews.wordpress.com/2012/03/20/microsoft-sql-server-error-18456-login-failed-for-user/