none
Can't connect using SQL Authentication

    Question

  • Hi!

    I am doing some tests here with SQL Server. Using the management studio I can connect to the server using my Windows user. Using that, I want to create a user and access a database.

    I went to the security folder, added a login, selected the SQL authentication, set the user and password.

    After that I added a user in the database using the login I just created (I gave the same name to both).

    When I try to open a new connection, I select SQL Authentication and input the user and password, but I get an error that I can connect:

     

    ===================================

    Cannot connect to localhost.

    ===================================

    Login failed for user 'qwe'. (.Net SqlClient Data Provider)

     

    Am I missing something?

     

    Thank you,

    Oscar


    http://theitphilosopher.blogspot.com/
    Saturday, October 16, 2010 1:35 PM

Answers

  • Hi Oscar,

    Please check what is the Authentication Mode for this SQL Instance? It should be selected Mixed Mode (SQL Server & Windows Authentication).

    In order to do that

    Open SQL Server Management Studio

    Connect to specific SQL Instance

    Right Click on Instance Name in Object Explore (left side)

    Select Properties

    Click Security option (from left side of Server Properties Window)

    Under Server Authentication, select SQL Server and Windows Authentication Mode.

     

     

    HTH


    Regards Gursethi Blog: http://ms-gursethi.blogspot.com/ ++++ Please mark "Propose As Answer" if my answer helped ++++
    • Edited by GURSETHI Saturday, October 16, 2010 1:48 PM added more details
    • Marked as answer by Oscarfh Saturday, October 16, 2010 2:06 PM
    Saturday, October 16, 2010 1:46 PM

All replies

  • Hi Oscar,

    Please check what is the Authentication Mode for this SQL Instance? It should be selected Mixed Mode (SQL Server & Windows Authentication).

    In order to do that

    Open SQL Server Management Studio

    Connect to specific SQL Instance

    Right Click on Instance Name in Object Explore (left side)

    Select Properties

    Click Security option (from left side of Server Properties Window)

    Under Server Authentication, select SQL Server and Windows Authentication Mode.

     

     

    HTH


    Regards Gursethi Blog: http://ms-gursethi.blogspot.com/ ++++ Please mark "Propose As Answer" if my answer helped ++++
    • Edited by GURSETHI Saturday, October 16, 2010 1:48 PM added more details
    • Marked as answer by Oscarfh Saturday, October 16, 2010 2:06 PM
    Saturday, October 16, 2010 1:46 PM
  • Hi!

    Thanks! that worked!


    http://theitphilosopher.blogspot.com/
    Saturday, October 16, 2010 2:06 PM
  • thank you.
    it worked for me too.
    Saturday, August 30, 2014 5:55 PM