Some SQL Server jobs fail with error: Connection reset
search cancel

Some SQL Server jobs fail with error: Connection reset


Article ID: 366721


Updated On:


CA Automic Workload Automation - Automation Engine CA Automic One Automation


When running database jobs against MS SQL Server, the job ends not okay sometimes (around 10% of the time) and it will be after the same amount of time each time, like 40 seconds exactly.  The connection object points to a listener instead of directly to a server.  The job report will return something like this:

02012001 Successfully established connection to '[Database listener name];IntegratedSecurity=True/[Database name]' with user '[DB Username]'.
    Microsoft SQL Server
 U02012014 JDBC Driver version: [JDBC Driver version]
    [SQL statements to be run]
    Connection reset
U02004026 Job-script execution was aborted.
U02012002 AutoCommit mode could not be deactivated.


Database Agent version 21.0.x


This is caused by connecting to a listener instead of directly to a database in the job's connection object


Update the connection object to connect to a database server directly instead of connecting to a listener.  

Some other troubleshooting steps could be to make sure the latest jdbc driver is used.

Ultimately the error in the job report is simply reported by Automic, but is an error coming from the jdbc driver; it is not caused by Automic.  Multiple teams may need to be involved in troubleshooting the issue as the issue could be network, OS, or database related.