MS SQL Server - JDBC Driver

Hello Knime Community :smiley:

I need to install JDBC driver in Knime Server to access MS SQL Server.
I followed this document, but without success:
https://docs.knime.com/2020-12/server_admin_guide/index.html#preferences-file

I add this line in my knime.init
-profileLocation
http://knime-server:8080/knime/rest/v4/profiles/contents
-profileList
executor

And in my executor.epf, I add :
/instance/org.knime.database/drivers/MHV/database_type=mssqlserver
/instance/org.knime.database/drivers/MHV/driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
/instance/org.knime.database/drivers/MHV/paths/0=/knime/server/workflow_repository/config/client-profiles/Driver/
/instance/org.knime.database/drivers/MHV/url_template=jdbc:sqlserver://xxx.xxx.x.xx;Database=xxxxx;integratedSecurity=false
/instance/org.knime.database/drivers/MHV/version=9.2.0

My .jar files is in folder :/var/opt/knime/server/workflow_repository/config/client-profiles/Driver/

Has anyone ever encountered this problem?

Thank you in advance for your help
Erwan

Your paths needs to have the jar file name in it as well.
For example : /knime/server/workflow_repository/config/client-profiles/Driver/mssql.jar

You can also change the hard coded path to the variable location
${profile:location}/db-driver.jar
The executor or client will replace that variable with the location relative to the environment.

In the same doc you referenced, there is another section on Client profile which goes into more detail
https://docs.knime.com/2020-12/server_admin_guide/index.html#client-customization

2 Likes

Thank for your response.
i see in this section : KNIME Server Administration Guide
“Note that driver.jar may also reference a folder in some cases (e.g. MS SQL Server and Simba Hive drivers)”
For MS SQL Server, do you have to point to the folder or to the .jar?
I tested both but without success.

I think my problem is on launching the executor. it does not seem to start with my configuration

My executor.epf :
executor.txt (540 Bytes)

My knime.ini
knime_ini.txt (857 Bytes)

Do I have to add something else?

Thank you in advanced
Erwan

Folders are supported for those drivers that require multiple jar files or shared libraries. SQL Server just needs one.

Do you have the executor’s knime.ini with the profileLocation and profileList parameters? If using the latest server versions, we have moved these parameters to environment variables if you are testing 4.13.0.

https://docs.knime.com/2020-12/server_admin_guide/index.html#preferences-file

There are two things I would check.

  1. Using the server rest interface you can manually download the preferences and ensure that the files are included as you have defined them.
  2. Once you determine #1 is working, then you can look in the executor workspace (configuration for the executor) and find the combined_profiles.epf file, which would show if the executor is actually get pulled from the server by the executor.