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:]

  • 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:]


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

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?

  • 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. – bwDraco Jun 27 '13 at 16:21

[ODBC] DRIVER=SQL Server Native Client 10.0 UID=drazen LANGUAGE=your native DATABASE=name_db WSID=name server APP=Microsoft Office 2010 Trusted_Connection=Yes SERVER=(local) Description=describe conn

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.