Login failed, Error:18456

  • Hi,

    I'm trying to connect to a SQL server 2000 with a SQL server management studio. This was working fine on my old computer but after upgrading to a newer model, I started getting this login fault. The server is using Windows Authentication. I have tried to log in directly on the server and everything seems to be OK. I created a new user, using SQL server authentication and can log onto that account from my computer. Im not experienced in SQL matters so bear with me if this is a stupid question.

    regards,

    Einar

  • Doing a quick google search on the subject you provided returned numerous links.  Perhaps that could help.  The first link I clicked on spoke of more information that was in the error message that I do not see in your post.

    Msg 18456, Level 14, State 1, Server <server name>, Line 1

    Login failed for user '<user name>'

    <st1laceName w:st="on">ERROR</st1laceName> <st1laceType w:st="on">STATE</st1laceType>

    ERROR DESCRIPTION

    2 and 5

    Invalid userid

    6

    Attempt to use a Windows login name with SQL Authentication

    7

    Login disabled and password mismatch

    8

    Password mismatch

    9

    Invalid password

    11 and 12

    Valid login but server access failure

    13

    SQL Server service paused

    18

    Change password required

    http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

    -- Cory

  • I have been looking for this error log that is supposed to contain more information on the cause of error, without luck. I have also tried to use the profiler to give those information.

  • I am not for sure it is there, but have you checked the event viewer?  Is this new machine on the same domain as the old one?

    -- Cory

  • The machine is not on the same domain. That was also the case with the old computer. But for some reason(maybe done by some program or trust configuration) the computer is registered on the right domain when connecting to the server. To explain this further:

    My computer is on x domain and my user name is a. The server is on y domain and my profile is y\a. When connecting using windows authentication, the connection is registered as y\a even though my login on the computer is x\a.

    But this was also the case with the old computer.

    I tried the event viewer but the faulted login is not register in the error log. The profiler gave more information and there I saw the faulted login, but not with this error code.

  • This is a bit confused.....generally doesn't matter where your computer is. It looks like you have an account in domain y and one in domain a. Are the domain trusted ?

    When you log directly on the server with your account, which on is it: y\a or x\a ?

    Have you got a new account ? If yes, when you have a new SID.

  • Well... I'm a bit confused to  The server is on domain y so when I log directly onto the server I log in as y\a

    I can not use my old account, the one that worked on my old machine.

  • Are the passwords for x\a and y\a the same ? If they are, you will be able to connect because of a feature of windows called passwthrough authentication (i.e. same user name and password but different domains). If the passwords for the two accounts are different, you will not be able to connect to SQL.

  • "I can not use my old account, the one that worked on my old machine"

    How do you log on the new machine ? In a domain doesn't matter if you get a new PC the previous account should work as well. I suspect that your "old account" has may been deleted and recreated (domain a). So the SID is now different and the login on the SQL Server do not match.

    BTW you should be able to log from your machine also with y\a and pw.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply