Anonymous
Not applicable

@Michel Smits​ :

It's hard to say for certain what could be causing the issue, but it's possible that there may be a race condition or some kind of timing issue that is causing the connection to go to the wrong server. Here are a few things you could try to troubleshoot and resolve the issue:

  1. Check the connection pool configuration: It's possible that the connection pool is not being configured correctly, which could cause connections to be reused in unexpected ways. Make sure that you are configuring the connection pool correctly for your specific JDBC driver and SQL Server version. You can check the documentation for your JDBC driver and SQL Server to get more information on the correct configuration parameters.
  2. Enable logging: Enable logging in your JDBC driver to get more information on what is happening when the connection is being made. You can also try enabling logging in your SQL Server to see if there are any errors or warnings that might provide more information about what is happening.
  3. Use a different JDBC driver: Try using a different JDBC driver to see if that resolves the issue. There are many different JDBC drivers available for SQL Server, so you may be able to find one that works better for your specific use case.
  4. Check the SQL Server settings: Check the SQL Server settings to make sure that they are configured correctly for your specific use case. For example, make sure that the connection string is correct and that the SQL Server is configured to accept connections from your IP address.
  5. Increase the timeout value: Increase the timeout value for your JDBC connection to make sure that the connection has enough time to establish properly. You can try setting the connectTimeout and socketTimeout parameters to a higher value to see if that helps.
  6. Use a different authentication method: Try using a different authentication method to see if that resolves the issue. For example, you can try using Windows authentication instead of SQL Server authentication to see if that works better for your specific use case.