Microsoft SQL Server Connector: time-out connection

Dear all,

I have a question about Microsoft SQL Server Connection node.
If my server is down, the node tries to connect to it and it remains in “working” mode indefinitely without raising an error. This means that it will never trigger my try-catch structure.
Is there a way to tell the node to stop trying to connect after a certain amount of time? Like a sort of time-out limit to set up?

Thanks!

Hi venturaz87,
sorry for the late reply. The timeout can be either changed globally via the Databases (legacy) preferences. To do so open KNIME and go to File->Preferences. Then go to KNIME->Databases (legacy)
image
Unfortunately this is a Java Virtual Machine wide setting which is why it also affects the new database nodes.

If you want to change the timeout only for a certain connection to a MS SQL Server you can use the loginTimeout. To do so open the configuration dialog of the Microsoft SQL Server Connector node. Make sure that you have the Official Driver for Microsoft SQL Server selected. Then go to the JDBC Parameter tab. In the tab click on the Add button and enter the settings marked below whereas the number is the login timeout in seconds as described here.


Bye
Tobias

1 Like

Dear Tobias,

Thanks for your answer! It was exactly what I was looking for.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.