1

I am trying to localhost using windows authentication with SQL Server management studio and I am getting a message that "Login failed for user..." (Error 18456).

I made sure that all the services are started, and I enabled the named pipe, TCP/IP protocol and shared memory for both Network configuration and Native Client config.

I have never tried to connect to localhost before, but I installed the Adventureworks sample database fine, and that's what I am trying to get to.

Thanks

Derek
  • 191
  • 1
  • 7

3 Answers3

3

Turns out that I had to go into the Surface Area Configuration and add myself as an Administrator. I am not really sure why this was the case, but it seems to have solved my problem. I could then connect using my computer name.

Derek
  • 191
  • 1
  • 7
  • This worked for me too. Strangely, I was already a member of the local Windows 'Administrator' group _and_ I was already able to connect remotely using SSMS. The two servers where I've observed this issue are both running Windows Server 2008. I've never observed this problem before with SQL Server 2005 on servers running Windows Server 2003. – Kenny Evitt Aug 18 '11 at 20:41
  • This took me hours to figure out, as someone who's not familiar with SQL Server databases. MS could've done a better job documenting this for beginners. – Martijn Heemels Nov 22 '12 at 11:24
0

Just curious, try using . as your connection point rather then typing localhost, let us know.

Nick O'Neil
  • 1,771
  • 11
  • 10
  • I tried it and got the same exact error message. I also tried "localhost", my computer name, 127.0.0.1 – Derek Nov 18 '10 at 18:17
  • 1
    hmm take a look at the windows event logs under application to see if anything stands out, also look into the sql logs located in \Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG , in addition if this is a named instance your connection might need to be LOCALHOST\SQLNAMED (replace SQLNAMED with actual instance name) – Nick O'Neil Nov 18 '10 at 18:26
  • Yeah, I had tried the named instance thinking that might be it but it didnt work. See my answer...finally figured it out – Derek Nov 18 '10 at 20:05
0

Is this running on server 2008/Vista or 2008R2/Win7? If so, try running management studio as administrator then logging in with windows auth.

Dan
  • 1,278
  • 18
  • 27