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

3 Answers 3

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.

2
  • 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. Aug 18, 2011 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. Nov 22, 2012 at 11:24
0

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

3
  • I tried it and got the same exact error message. I also tried "localhost", my computer name, 127.0.0.1
    – Derek
    Nov 18, 2010 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) Nov 18, 2010 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, 2010 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.

1
  • See my answer...finally figured it out
    – Derek
    Nov 18, 2010 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .