none
Login failed message via SQL server account....

    Question

  • Hi, everyone.

    An error message as follow has come to me when I logged in SQL server via web server.

    The message;

    Server: Msg 18456, Level 14, State 1, Line 1
    Login failed for user 'os login account'.

    I dose not understannd what has happed to me. Anyone let me know how to solved this issue or how to survey what caused the issue.

    Best regard.

    Friday, November 29, 2013 12:34 PM

Answers

  • Hi, Thank you for suggestions.

    I checked SQL server's LOG FILE via SQL Server Management Stuio.

    When the login action from Web server which is Blue Dragon has done, an error message as follow,

    Source:Login

    Message:Login failed for user 'os login account'. Reason: Could not find a login matching the name provided.

    Log Type:SQL Server

    Error:18456, Severity 14,Status 5

    That's all.

    Is there any instruction of slving this?

    Thank you for cooperation.

    Regards.

    Hello,

    I think OSUser account is not added into SQl server Account .State 5 means Invalid user ID which can tantamount  to fact that User ID does not exists in SQL server.

    Log into SQLserver instance as local admin via SSMS--Expand security folder--RK Login__new login--select Windows authentication and type machine account as 'Domainame\Loginame' and then go to server role and assign account privileges.Then select OK

    see this discussion also

    http://social.msdn.microsoft.com/forums/sqlserver/en-US/e2d819ed-49dd-4e18-87f1-05a6dc86a8c6/error-18456-severity-14-state-5


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Monday, December 02, 2013 11:44 AM

All replies

  • Hi,

    a little more details please.

    How does the web Server (the web application?) log on to the SQL Server?
    Which web Server do you use?
    Can you post the Connection string?

    Alex


    • Edited by Alex Vary Friday, November 29, 2013 12:56 PM
    Friday, November 29, 2013 12:56 PM
  • Hello,

    Is the SQL Server running in "Windows only" or in Mixed Mode = "Windows and SQL Logins"?

    Is the SQL Login create + enabled and does it have permission to logon?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, November 29, 2013 1:13 PM
    Moderator
  • Hi, everyone.

    An error message as follow has come to me when I logged in SQL server via web server.

    The message;

    Server: Msg 18456, Level 14, State 1, Line 1
    Login failed for user 'os login account'.

    I dose not understannd what has happed to me. Anyone let me know how to solved this issue or how to survey what caused the issue.

    Best regard.

    Hello,

    Does this OS account is added in SQL server login and does it has required privileges.My guess is that this login is not present in SQL server.Is this SQL login or windows make sure login is added and has required privileges


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Friday, November 29, 2013 1:18 PM
  • There are several reasons this can happen. Check the SQL Server errorlog file - you find the reason for the refusal in there.

    Tibor Karaszi, SQL Server MVP | web | blog

    Sunday, December 01, 2013 2:51 PM
    Moderator
  • Hi, Thank you for suggestions.

    I checked SQL server's LOG FILE via SQL Server Management Stuio.

    When the login action from Web server which is Blue Dragon has done, an error message as follow,

    Source:Login

    Message:Login failed for user 'os login account'. Reason: Could not find a login matching the name provided.

    Log Type:SQL Server

    Error:18456, Severity 14,Status 5

    That's all.

    Is there any instruction of slving this?

    Thank you for cooperation.

    Regards.

    Monday, December 02, 2013 11:32 AM
  • Apparently your applicaton tries to login to your SQL Server using an SQL Server login with the name "os login account", which doesn't exist on your SQL Server. You need to create a login on your SQL Server with that name, as in:

    CREATE LOGIN [os login account] WITH password = 'thepasswordyouwant'

    Or, use the GUI. If you except a windows account to be used, then you need to talk to the app developers so thay can specify the appropriate attributes in the connection string.


    Tibor Karaszi, SQL Server MVP | web | blog

    Monday, December 02, 2013 11:41 AM
    Moderator
  • Hi, Thank you for suggestions.

    I checked SQL server's LOG FILE via SQL Server Management Stuio.

    When the login action from Web server which is Blue Dragon has done, an error message as follow,

    Source:Login

    Message:Login failed for user 'os login account'. Reason: Could not find a login matching the name provided.

    Log Type:SQL Server

    Error:18456, Severity 14,Status 5

    That's all.

    Is there any instruction of slving this?

    Thank you for cooperation.

    Regards.

    Hello,

    I think OSUser account is not added into SQl server Account .State 5 means Invalid user ID which can tantamount  to fact that User ID does not exists in SQL server.

    Log into SQLserver instance as local admin via SSMS--Expand security folder--RK Login__new login--select Windows authentication and type machine account as 'Domainame\Loginame' and then go to server role and assign account privileges.Then select OK

    see this discussion also

    http://social.msdn.microsoft.com/forums/sqlserver/en-US/e2d819ed-49dd-4e18-87f1-05a6dc86a8c6/error-18456-severity-14-state-5


    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

    Monday, December 02, 2013 11:44 AM
  • Hi OlegSmirnov,
     
    Considering that you connect to SQL Server instance remotely, you should notice the following things firstly:

    • Named pipes are enabled
    • TCP/IP is enabled
    • Remote connections are allowed

     
    The state 5 means that a user with a inexistent name to login SQL server instance. This error mostly comes in when users specify wrong user name or misspell the login name. So in order to avoid this error, please make sure you have specified the correct user name.

    Another possibility, when you create the SQL Server login name using Management Studio, and the option of requiring the user to change the password on first login is checked. If you didn't immediately login with Management Studio and change the password, then attempt to login from the other machine, it will fail. For more detail, you can refer to the following thread:
    http://stackoverflow.com/questions/7119602/how-to-make-sql-server-find-a-login-matching-the-name-provided

    Hope these helps.

    Thanks,
    Katherine Xiong


    Katherine Xiong
    TechNet Community Support

    Tuesday, December 03, 2013 1:50 AM
    Moderator
  • Hi, Shanky and all,

     I solved my issue according to your suggestion. It is very helpful.

    Thank you for your kindness and helpful suggestion.

    Regards....

    Thursday, December 05, 2013 8:31 AM