1. Home
  2. How to set a finite query timeout for SQL Audit Database

How to set a finite query timeout for SQL Audit Database

Overview

By default, the Microsoft SQL JDBC driver uses an infinite timeout for the execution of any query. This means that if you have any trouble with the back-end database (like deadlocks), Diplomat MFT will wait infinitely for any Audit queries to complete.

In a situation such as this, the Diplomat MFT job execution threads will be tied up forever, eventually consuming all available Job Queue slots and preventing any jobs to execute.

To overcome this potential problem, you can configure Diplomat MFT Auditing to explicitly define a SQL Server JDBC connection string that includes a timeout.

Connection String

In the Diplomat MFT Audit dialog set the following values:

SQL Database Type: Custom JDBC

Driver:

com.microsoft.sqlserver.jdbc.SQLServerDriver

Connection String:

jdbc:sqlserver://<HOST>:<PORT>;userName=diplomatacct;password=S3CR3TP@ss;database=<DBNAME>;queryTimeout=10;

Screenshot

Updated on July 23, 2022

Was this article helpful?