How can I connect database(MSSQL Server) with Mathematica?



Newly I started working with database(MSSQL Server 2012).

by google help, I created Table name as EmployeesList and also Insertedvalues into the table.

know I want to connect database with Mathematica.for that I seen documentation and founded OpenSQLConnectionfunction.but still not connected.

 databaseInstalizationLink="C:\\Program Files\\Microsoft SQL Server";  

I seen JDBCfunction also but I didn't get it.

I tried OpenSqlConnection[]wizard if you evaluate the below one line code we get the wizard that screenshots I posted below


Step 1:

enter image description here

I click on New Button

Step 2:

enter image description here

I click on Next button.

Step 3:

enter image description here

Step 4:

enter image description here

here,I changed to SystemLevel.

Step 5:

enter image description here

but,I installed 2012 version .

Step 6:

enter image description here

Step 7:

enter image description here

here,I didn't add any properties because,I didn't understood.

Step 8:

enter image description here

Finally,I click on Connect button but,it shows $Failed.

I hope,everyone understood what my problem.

can anyone help me?

Fell free,If you want to edit my question.


Posted 2013-04-08T11:15:21.903

Reputation: 2 204

At step 6 was the name of your database listed in the database field? If it is not you haven't established a proper connection yet. Does your database have a password and user name? Just to clarify, your database should appear on the list of databases in the database field and you should be able to select it,is this what is happening? – ERW – 2013-04-09T10:06:53.110

my database doesn't have password and username.I field specific database name in Step 6,still it's not working. – subbu – 2013-04-09T11:45:08.623

@PinguinDirk I tried that too also,still not connected for more information I will modify my question. – subbu – 2013-04-08T11:41:55.620

@PinguinDirk ok..can You tell is it right,what I did in wizard. – subbu – 2013-04-08T12:27:38.937

as it is all MSSQL (no longer mysql) now, I am of no help. will delete other comments – Pinguin Dirk – 2013-04-08T18:30:40.437

You can try this solution:

– Murta – 2013-06-09T01:55:46.863

Completely unrelated to the question, but on Windows you can use Alt+PrtScr to screenshot just the current window. That way you don't need to crop the screenshots. – Corey Kelly – 2013-06-09T02:16:28.050



Please refer to my answer here, it FINALLY works after struggling for almost a year. I hope this works for everyone else. I'd suggest completely ignoring the connection wizard and going the code route:

How to connect Mathematica 9 to MS SQL 2012 using Windows 7 enterprise (64-bit)


Posted 2013-04-08T11:15:21.903

Reputation: 968