You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Querying SQL via ODBC with MS-SQL Server is not supported on MacOs using MFA (see the Microsoft ODBC driver feature matrix). According to the same document, JDBC is supported.
How to connect to a MS-SQL Server database using RJDBC and MFA?
MFA appears to require MSAL4J to enable MFA. In any case, configuration is not intuitive or trivial, though apparently possible.
A skeleton so far is:
library(rJava)
library(RJDBC)
## ---- Set up the Driver variabledrv<- JDBC(
driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver",
classPath="/Users/myusername/sqljdbc_10.2_enu/mssql-jdbc-10.2.1.jre17.jar",
identifier.quote="`")
conn<- dbConnect(
drv,
url="jdbc:sqlserver://MY_SERVER_NAME;Encrypt=true;TrustServerCertificate=false;Connection Timeout=30;Authentication=ActiveDirectoryInteractive",
"my_user_name",
rstudioapi::askForPassword("Database password")
)
this almost works:
Error in dbConnect(drv, url = ...
Unable to connect JDBC to jdbc:sqlserver:// ...
JDBC ERROR: Failed to load MSAL4J Java library for performing ActiveDirectoryInteractive authentication.
So, this is close but unclear how to correctly include the MFA java library at this point.
Any recommendations ?
Perhaps how to include an arbitrary maven artifact from RJDBC like
Querying SQL via ODBC with MS-SQL Server is not supported on MacOs using MFA (see the Microsoft ODBC driver feature matrix). According to the same document, JDBC is supported.
How to connect to a MS-SQL Server database using RJDBC and MFA?
MFA appears to require MSAL4J to enable MFA. In any case, configuration is not intuitive or trivial, though apparently possible.
A skeleton so far is:
this almost works:
So, this is close but unclear how to correctly include the MFA java library at this point.
Any recommendations ?
Perhaps how to include an arbitrary maven artifact from RJDBC like
??
thanks in advance
The text was updated successfully, but these errors were encountered: