Unspecified error occurred on SQL Server. Connection may have been terminated by the server.
This is error I am getting.(when the job is executed)
[SQLSTATE HY000] (Error 0) Cannot continue the execution because the session is in the kill state.
[SQLSTATE HY000] (Error 596). The step failed.
Best Answer
The error log should contain some information about what session killed a particular process. Run the following statement to get the hostname and process id of the user the
KILL
command originated from.EXEC xp_readerrorlog 0, 1, N'kill', NULL, NULL, NULL, N'DESC'
Note that if any time has gone by since the command was run, this may return stale results as session ids are reused. Using the Host Process ID, you can then find the user:
Here's an example: