locked
Login failed for user 'sa' RRS feed

  • Question

  • I am trying to login to SQL Server 2005 using SQL Server authentication using 'sa'  account but it gives the below error:

    Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)

    i use the web engines for solving this problem but i cant. i know this is a very common. but i dont know how can fix it.

    Monday, April 2, 2012 7:54 PM

Answers

  • Hi Bouki,

    If you want to access database with specific user password, you can use User ID and Password options in connectin strings to set user and password as your want.

    For more information, please refer to Connection strings for SQL Server 2008 : http://www.connectionstrings.com/sql-server-2008

    Regards, Amber zhang

    • Marked as answer by Bouki Wednesday, April 4, 2012 11:42 AM
    Wednesday, April 4, 2012 1:31 AM

All replies

  • Hello,

    Generally this happens when the integratedsecurity option in connection strings is set to true or sspi. IntegratedSecurity implies using windows authentication and not sql authentication even if a username and password combo are in the same connection string.

    The only other time I have witnessed this is when windows authentication only is set as the security for the instance. In this case, change the security for the instance to mixed mode and restart the sql server service.

    -Sean

    Monday, April 2, 2012 10:53 PM
  • Thanks.

    its worked perfect.

    but now i use databases with my application.  i want access to my databases just with specific user password.

    can i disable all other users?


    • Edited by Bouki Tuesday, April 3, 2012 5:27 AM
    Tuesday, April 3, 2012 5:16 AM
  • Hi Bouki,

    If you want to access database with specific user password, you can use User ID and Password options in connectin strings to set user and password as your want.

    For more information, please refer to Connection strings for SQL Server 2008 : http://www.connectionstrings.com/sql-server-2008

    Regards, Amber zhang

    • Marked as answer by Bouki Wednesday, April 4, 2012 11:42 AM
    Wednesday, April 4, 2012 1:31 AM