Group Abstract Group Abstract

Message Boards Message Boards

Having issues connecting to MS SQL authenticated via Microsoft Entra Integrated

Posted 2 days ago

With the standard installation I wasn't able to connect to the new instances of MS SQL servers being deployed at my company.

I was finally able to connect by downloading the appropriate JAR and libraries into a custom directory:

"C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\accessors-smart-2.6.0.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\azure-json-1.5.0.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\content-type-2.2.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\json-smart-2.6.0.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\msal4j-1.22.0.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\mssql-jdbc-12.10.1.jre8.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\mssql-jdbc_auth-10.2.0.x64.dll", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\nimbus-jose-jwt-10.4.1.jar", "C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\msSQL\oauth2-oidc-sdk-11.27.jar"}

Code to connect

<< "DatabaseLink`"

sqlEntra =
SQLConnection[
JDBC["com.microsoft.sqlserver.jdbc.SQLServerDriver",
"jdbc:sqlserver://myserver.database.windows.net;

DatabaseName=myDB;authentication=ActiveDirectoryInteractive;
UID=myuser@example.com;encrypt=true;TrustServerCertificate=false;"],
"Name" -> "myName", "Catalog" -> Automatic,
"Description" -> None, "ReadOnly" -> Automatic,
"RelativePath" -> False, "TransactionIsolationLevel" -> Automatic,
"UseConnectionPool" -> Automatic];

ReinstallJava[
ClassPath ->
"C:\Users\myUserID\AppData\Roaming\Wolfram\Applications\Java\\
msSQL"]

conn= OpenSQLConnection[sqlEntra]
POSTED BY: Diego Zviovich
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard