Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to connect to a SQL Server 2008 database from a 3rd-party application through an ODBC connection. I am having success when the ODBC is set up with Windows Authentication but not when it's set up with SQL Server Authentication.

My general process is

  • Create 64-bit System ODBC DSN ("C:\Windows\SysWOW64\odbcad32.exe")
  • When I create the DSN I test the connection at the end and it all looks good. ANd I can verify this in SQL Server using

Login succeeded for user 'myuser'. Connection made using SQL Server authentication. [CLIENT: 10.85.43.91]

  • I then go to my application, reference that DSN and try to login. I get an error saying Unable to connect to general Datasource. Connect String: DSN=<DSN Name> Error: login failed for user ''. I then go back to the SQL error log and see

Login failed for user 'myuser'. Reason: Password did not match that for the login provided. [CLIENT: 10.85.43.91]

and

Login failed for user ''. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: 10.85.43.91]

I am able to connect to SQL through SMSS with that username and run queries.

I'm also able to verify that Authentication mode is MIXED. from the log lines at server startup. Same verification via Object Explorer > Server Properties > Security > SQL Server and Windows Authentication Mode.

We started the server last night, too just to make sure all these settings were true.

This happens while trying to connect from at least 4 computers.

What gives? What am I missing? Why can I not connect to SQL with SQL Authentication via ODBC?

share|improve this question
    
How are you passing the credentials to the ODBC driver? Also are you sure your program is using the 64 bit driver? –  Scott Chamberlain Jun 26 '13 at 15:35
    
Also I think you may get better answers on Stack Overflow, I voted to move. –  Scott Chamberlain Jun 26 '13 at 15:37
    
I give the SQL Server user name and password to the DSN when I set it up through Windows, then in the application I just elect to use that one. I am sure the program is using the 64 bit driver. The program has the option to create DSNs from within it too (it opens up the Windows tool) and it makes 64-bit DSNs. Plus if I make a 32-bit system DSN it doesn't show up on the list of available connections. –  Brad Jun 26 '13 at 15:39
    
@ScottChamberlain I wrote this all up on SO then thought it would be better here :) I guess I was wrong. –  Brad Jun 26 '13 at 15:40
3  
Questions about database administration are off-topic here, but can be asked on Database Administrators Stack Exchange. –  DragonLord Jun 27 '13 at 16:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.