locked
"Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection" - and mixed mode IS enabled RRS feed

  • Question

  • Hi all,

    I have a LINUX server that is running JAVA and needs to make a SQL connection to our Microsoft SQL 2008 R2 server. Mixed mode is enabled and the local user (not 'sa' user) is able to log in to management studio. Telnet from the LINUX server on port 1433 also works.

    What is wrong?


    Regards,
    Allan Kjaer
    Microsoft MCP, MCDST, MCSA 2003, MCTS Configure Exchange 2010, MCITP Server Administrator 2008
    Check Point CCSA, CCSE
    Cisco CCENT, CCNA
    IT Service Management ITIL Foundation Version 2011

    Tuesday, January 13, 2015 12:39 PM

All replies

  • I guess its an issue with the connection string.  Are you using the correct connection string?

    Trusted Connection(when using windows authentication)

    Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

    SQL Authentication(when using SQL ID) 

    Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;


    Satheesh
    My Blog | How to ask questions in technical forum

    Tuesday, January 13, 2015 12:44 PM
  • did you try to login with sa using management studio?

    Did you restart sql server after enabling mixed mode authentication?


    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

    Tuesday, January 13, 2015 12:45 PM
  • Yes, mixed mode was enabled years ago, so the server has been restarted many times since.

    Regards,
    Allan Kjaer
    Microsoft MCP, MCDST, MCSA 2003, MCTS Configure Exchange 2010, MCITP Server Administrator 2008
    Check Point CCSA, CCSE
    Cisco CCENT, CCNA
    IT Service Management ITIL Foundation Version 2011

    Tuesday, January 13, 2015 12:46 PM
  • How does your connection string look like?

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Tuesday, January 13, 2015 1:10 PM
  • Hi Olaf,

    Actually it is an external consultant that is configuring the connection, but I believe he's using DB Visualizer to connect. I've asked him about the connection string he's using.


    Regards,
    Allan Kjaer
    Microsoft MCP, MCDST, MCSA 2003, MCTS Configure Exchange 2010, MCITP Server Administrator 2008
    Check Point CCSA, CCSE
    Cisco CCENT, CCNA
    IT Service Management ITIL Foundation Version 2011

    Tuesday, January 13, 2015 2:04 PM
  • Hi Satheesh,

    Actually it is an external consultant that is configuring the connection, but I believe he's using DB Visualizer to connect. I've asked him about the connection string he's using.


    Regards,
    Allan Kjaer
    Microsoft MCP, MCDST, MCSA 2003, MCTS Configure Exchange 2010, MCITP Server Administrator 2008
    Check Point CCSA, CCSE
    Cisco CCENT, CCNA
    IT Service Management ITIL Foundation Version 2011

    Tuesday, January 13, 2015 2:04 PM
  • "Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection"

    The error indicates that SQL is somehow thinking that 'sa' is a windows user and that's possible when you pass a invalid connection string. Please post the connection string or(how he is making the connection) when you get to know more about this.


    Satheesh
    My Blog | How to ask questions in technical forum

    Tuesday, January 13, 2015 2:29 PM