Connection failure to SQL Server using active directory

Highlighted
Six Stars

Connection failure to SQL Server using active directory

Hello!

I have a context variable group for connection. Their I have created a "local" context with my company's username and password. I added additional parameters as sendStringParametersAsUnicode=false;trustServerCertificate=true;authentication=ActiveDirectoryPassword

 

Now the issue is when I try to retrieve schema or run the job using this local context variable, Talend throws error saying 

Connection failure, check the database settings or contact your database administrator.

Detailed error:

Connection failure, check the database settings or contact your database administrator.
java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: com.microsoft.sqlserver.jdbc.AuthenticationJNI.ADALGetAccessToken(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLjava/util/logging/LoggerSmiley WinkLcom/microsoft/sqlserver/jdbc/FedAuthDllInfo;
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:204)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1139)
at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:315)
at org.talend.metadata.managment.repository.ManagerConnection.check(ManagerConnection.java:386)
at org.talend.metadata.managment.repository.ManagerConnection.check(ManagerConnection.java:320)
at org.talend.repository.ui.wizards.metadata.table.database.SelectorTableForm$8.run(SelectorTableForm.java:1105)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.sqlserver.jdbc.AuthenticationJNI.ADALGetAccessToken(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLjava/util/logging/LoggerSmiley WinkLcom/microsoft/sqlserver/jdbc/FedAuthDllInfo;
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.ADALGetAccessToken(Native Method)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.getAccessToken(AuthenticationJNI.java:81)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.getFedAuthToken(SQLServerConnection.java:3637)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.onFedAuthInfo(SQLServerConnection.java:3605)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.processFedAuthInfo(SQLServerConnection.java:3572)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onFedAuthInfo(tdsparser.java:290)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:94)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4346)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3160)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:43)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3123)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1981)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1628)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1459)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:773)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1168)
at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:195)

I also imported the Microsoft JDBC Driver 6.0 for SQL Server (sqljdbc-auth.dll). Still it didnt work. Which driver then should I use?

 

Regards

Priyadarshini

 

 


Accepted Solutions
Six Stars

Re: Connection failure to SQL Server using active directory

There was missing sqldll in my java bin folder. once i added that and added the same dll in modules in talend, it started working.

 

Regards

Priya

View solution in original post


All Replies
Eleven Stars

Re: Connection failure to SQL Server using active directory

Six Stars

Re: Connection failure to SQL Server using active directory

I am accessing SQL server with client's windows authentication. But I am using my laptop with my own credentials and not client's. Can I use the same solution in this case too? I was thinking about the integratedSecurity point mentioned in the article.

 

Regards

Priya

Six Stars

Re: Connection failure to SQL Server using active directory

There was missing sqldll in my java bin folder. once i added that and added the same dll in modules in talend, it started working.

 

Regards

Priya

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog