Connection to SQL server databases from Mathematica

4

1

I am an SQL developer and very new to Mathematica. As per my requirement I need to make a connection from Mathematica to my sql server database, after which my client will do some analysis with the data from the tables. I tried make a connection using DatabaseExplorer. After entering all the information (Server name, db, user, password), when I hit test button , I am getting a error saying JDBC::error. I even tried this

OpenSQLConnection[JDBC["Microsoft SQL Server (jTDS)", "HC1235/TEST_DB"], 
  "Username" -> "TESTUSER1", "Password" -> "Dataanalysis15"]

which gave the error

JDBC::class not found

Can someone please help me here. Please ask me if you need more info about the question. Any help will be appreciated.

Siva

Posted 2015-09-30T21:53:53.983

Reputation: 41

1

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.

– bbgodfrey – 2015-09-30T22:25:36.840

Answers

1

Here is an example of connection for SQLServer:

  Needs["DatabaseLink`"]

  conn = OpenSQLConnection[
    JDBC["Microsoft SQL Server(jTDS)", "192.168.0.6"]
   ,"Username" -> "myUser"
   ,"Password" -> "myPass"
  ]

Murta

Posted 2015-09-30T21:53:53.983

Reputation: 23 859