How to connect to SQL Server?

  • Hi all,

    I have absolutely no clue whats going on. So when I open SSMS, I click on the "Connect" button under Object Explorer, Database Engines, I type in my Server Name, and Wndows Authentication..then I get this error:

    Login failed for user ' '. (Microsoft SQL Server, Error: 18456)

    Then I went to check the log,

    Error: 18456, Serverity: 14, State: 5.

    Login failed for user ' '. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]

    I tried SQL authentication afterwards, the log says

    Error: 18456, Severity: 14, State: 58. Login failed for user ''. Reason: an attempt to login using SQL autentication failed. Server is configured for windows autentication only. [CLIENT: <local machine>]

    Is this because when the person installed the SQL server, he didn't create a user account for me?

    How do I approach this? Been doing some research, and found something that said

    "First you will start the instance in single user mode, then connect to it and add your login, then add the sysadmin role to your login. Again, this is the resolution if it is a permissions problem and not something else listed in the error log, however this is the most common issue."

    How should I approach this problem?

  • are you editing out your user name or are you not providing a user name?


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • When I use Windows Authentication, the user name and password field are greyed out.

  • i would hazard to guess your user is not authorized to the login to the server. in which case you would need to contact the system administrator.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • Strange, but when I choose Server Type: Analysis Services or Reporting Services, I can log in using Windows Authentication. But for Database Engine, and Integration Services I cannot.

  • Hi

    I think you need to add specific rights to your windows account through which you are connecting Dabasae engine.

    Go to user's properties and select MemberOf tab and add the specific rights.

  • By specific rights you mean?

    I am a member of:

    Adminstrators

    SQL Server2005SQLBrowserUser

    SQLServerMSASUser

    Users

  • Hi Alan,

    as per your logs error:

    "Error: 18456, Severity: 14, State: 58. Login failed for user ''. Reason: an attempt to login using SQL autentication failed. Server is configured for windows autentication only. [CLIENT: <local machine>]"

    I can say you are not using windows authentiacation for login, might be using sql authentication.

    And pls kindly add, SQLServerMSSQLUser in properties of user's memberof tab It might help you.

  • Here is the log error when I user Windows Authentication:

    Login failed for user' ' . Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]

    I tried search for the group you said, does not exist.

  • Youre windows account must be added to the logins on the SQL server. In order to do anything in addition to connecting you will also need permissions to access objects in the database either through a server level role like 'sysadmin' or a database role like 'dbo' or 'db_datareader'. By default SQL server 2008 is only accessable by the account that performed the install. That user must add accounts\groups to the server to allow connections.

  • Check if you have correct server name mentioned in the connection string? is it default instance or Named instance? If it is default then you just enter the server name and if you know the port , try to enter the port info as well...Please check the attached screenshot

    also, if it is a default server, try to ping it through cmd.. just open command prompt and type

    ping yourservername

    exp:- ping test.dev.someone.com

  • "Error: 18456, Severity: 14, State: 58. Login failed for user ''. Reason: an attempt to login using SQL autentication failed. Server is configured for windows autentication only. [CLIENT: <local machine>]"

    Yes, this means that you only have Windows authentication. You can ask the SA to create a SQL authentication if he is willing do it. But I would say Windows authentication is much safer. If SA will create a SQL authentication, he just need to restart the server.

    Regards,

    TA

    Regards,
    SQLisAwe5oMe.

  • I have admin rights, does that work? What steps should I take to add the account?

  • So I checked the install log, it says: SQLSYSADMINACCOUNTS: abc\Adminstrator, SQL_SVC

    1) Does that mean the account SQL_SVC was used to install SQL Server?

    2) Can this account add me as a sysadmin?

    3) If I can log into as SQL_SVC, how do I add my Windows account to access SQL Server?

    I think I am getting close to the solution 😀

    Thanks,

    Alan

  • Alan Kwan (4/25/2012)


    So I checked the install log, it says: SQLSYSADMINACCOUNTS: abc\Adminstrator, SQL_SVC

    1) Does that mean the account SQL_SVC was used to install SQL Server?

    2) Can this account add me as a sysadmin?

    3) If I can log into as SQL_SVC, how do I add my Windows account to access SQL Server?

    I think I am getting close to the solution 😀

    Thanks,

    Alan

    I think your issue is that you only have windows authentication, you can Change it to mixed mode....go to sql server property then change the options to mixed mode to to include sql authentication....then try....not sure if this is the issue.....let me know.

    Regards,

    TA

    Regards,
    SQLisAwe5oMe.

Viewing 15 posts - 1 through 15 (of 15 total)

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