1
$\begingroup$

I am trying to make a connection from WOLFRAM- MATHEMATICA to an SQL server database. When I tried with my windows authentication, I am getting an error saying login failed for user, but when I tried with SQL authentication account it is working fine. I don't know why. Can some one please tell me why it is working for SQL account and not for my windows account? What are the steps (if any changes in SQL server) I need to do get WOLFRAM-MATHEMATICA to work with my windows user account. Any help will be appreciated.

here is the syntax I used in mathematica

Needs["DatabaseLink`"]
conn = OpenSQLConnection[
  JDBC["Microsoft SQL Server(jTDS)", "MYSERVERNAME:1433/"], 
  "Username" -> "MYUSERID", "Password" -> "MYPASSWORD", 
  "Catalog" -> "MYDB", "instance" -> "MSSQLSERVER"]
$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$ – bbgodfrey Oct 20 '15 at 15:55
  • $\begingroup$ Have you tried making an ODBC connection using the appropriate Windows control panel? In my experience that's the easiest way to get a sql connection in Mathematica. You could also try the Mathematica's database explorer. BTW is your server set up to accept both ways of authentication? $\endgroup$ – Sjoerd C. de Vries Oct 20 '15 at 18:01
  • $\begingroup$ Relevant: 26745. $\endgroup$ – Sjoerd C. de Vries Oct 20 '15 at 18:05
  • $\begingroup$ Also relevant: Microsoft SQL DatabaseLink connection using Windows Authentication. $\endgroup$ – WReach Oct 20 '15 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.