6

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?

10
  • How are you passing the credentials to the ODBC driver? Also are you sure your program is using the 64 bit driver? Commented Jun 26, 2013 at 15:35
  • Also I think you may get better answers on Stack Overflow, I voted to move. Commented Jun 26, 2013 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
    Commented Jun 26, 2013 at 15:39
  • @ScottChamberlain I wrote this all up on SO then thought it would be better here :) I guess I was wrong.
    – Brad
    Commented Jun 26, 2013 at 15:40
  • 3
    Questions about database administration are off-topic here, but can be asked on Database Administrators Stack Exchange.
    – bwDraco
    Commented Jun 27, 2013 at 16:21

1 Answer 1

-2

[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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .