login failed for user ID 'sa', but not using user 'sa'

I know the SQL Server error log is correct:  Login failed for user 'sa'. Reason. Password did not match.....

SQL Server 2012 Express on a Server2012

I create an connection string for my C# desktop application using a text file connect.udl.  Open it up with OLE DB Core Services, enter the user ID 'myapplication' and the associated password.  Test connection and Test connection succeeded.  Copy the resulting connection string into my application (I am changing the app to point at a new SQL Server, this database server and connection method has been working for years pointing to the previous SQL server 2000).  SSMS logins in using SQL Authentication and 'sa' and password and myapplication/password.

With the connect string as Provider=SQLOLEDB.1;Password=#$%&;User ID=myapplication.... the error message says 'sa'.  So I'm not sure what else to look at - I'm not logging in as 'sa'.  

SQL Configuration has Named Pipes and TCP/IP enabled.  SQL Browser is running.  Another database table is is working fine! Where else can I look?  Is there a permission setting for my desktop application?  Thanks

April 23rd, 2015 12:06am

Have you checked the connection string in your web.config/app.config? Use process monitor to check the issue.
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 2:23am

this link should give all the connection string to sql server

http://www.connectionstrings.com/sql-server/

but can you verify if your application is really using that connection file ? try running trace alongside and try to connect to the database.. so do you atleast see  a call from this config file with username - myapplication??

April 26th, 2015 10:02am

I suggest you step through the code in a debugger. The sa account won't be used unless the application specifies it.  Check for something either hard-coded in the application or a different configuration than the one expected.

Be aware that the SQLOLEDB provider has been deprecated for many years.  Consider using the SQL Server 2012 Native Client provider instead.

Free Windows Admin Tool Kit Click here and download it now
April 26th, 2015 1:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics