Login failed for User 'abc'

  • Hi All,

    I create a new SQL login for User ID 'abc' and try to login to the server following error message coming. I didn't give sysadmin role for this Login ID, because this user only has limited privileges

    Login failed for User abc(Microsoft SQL Server, Error:18456)

    on Error log

    ------------

    Login failed for User abc

    Error: 18456, Severity: 14, State: 12.

  • State 12 indicates the user does not have access to the default database or the initial database in the connection string.

    Ref: http://sqllearnings.blogspot.com/2008/10/error-18456-severity-14-login-failed.html

    Thanks.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • 1. Open Sql Server Managment Studio

    2. Connect the server

    3. Expand Security

    4. Expand Logins

    5. Click on "abc"--> Right Click --> Properties

    6. Under "Select a Page" select General and in the right pane find the option "Default Database:" , in the dropdown select the database on which the login has access.

    8. Press OK.

    ---------------------------------------------------
    Thanks,
    Satheesh.

  • Hi Erode P. Satheesh,

    Thanks for ur replay. I try (Default Database: master and also try one of User Database), but not work. any other idea?

  • What database the user has access to? Can you confirm their permissions are correct in the database in question?

    Mohit.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • Hi All,

    Today I create a new SQL user from same server. That one also can not login.

    This is the setp to I Create New user:

    Security--> Login--> New User (right click)

    1) Type the Login Name

    2)Select SQL Server authentication mode

    3)Enter Password, confirm password

    4)Untick password policy,expiration,and user must change next login

    5)Click OK

    I did not change default database or server roll, but try to login, same error came.

    Note :I am connect from my local machine management studio to server

  • Okay in that process you did not grant the login any permissions to the database. This is just creating a server login; now you have to create a database user that maps to that login.

    Lets use master as example:

    Go to Databases

    System Databases

    master

    Security

    Users

    Right Click New User

    Enter in your LoginName in both text boxes

    Select db_datareader in the database roles list.

    Click OK.

    Then try logging into the server...

    Mohit.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • If you are evaluating SQL Server you can put your new users like DB_Owner. This work fine for connections throw other applications like visual studio or web development.

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

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