Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

how to check who has killed the job which was running?if logs are not generated

Asked by Cameron Oliver Sep 4, 2021 5.5K views 2 answers
Share

About this question

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. what is sql server kill process?

Your answer

2 Answers

Ranjana Admin JanBask Expert Latest answer

Answered on May 7, 2024

If logs are not generated and you need to determine who killed a job that was running, it can be challenging to identify the culprit directly. However, there are a few strategies you can try:


Check Job History: Some systems maintain a history of job executions, including information about who triggered or terminated the job. Check if your system or job scheduler keeps such logs or history records. If available, they might provide insights into who interacted with the job.

Audit Trail: Review your system's audit trail or activity logs. Look for any relevant entries around the time the job was terminated. While these logs may not explicitly state who terminated the job, they might provide clues or context about the activity on the system.

Access Control: If your system has access controls or permissions management, check if there are any users or roles with the authority to terminate jobs. Review access logs or permission changes to see if any user or role with such permissions interacted with the job.

Communication Channels: Reach out to your team or colleagues who have access to the system. Sometimes, someone might have terminated the job due to an emergency, system maintenance, or other valid reasons. By communicating with others, you might be able to identify the person responsible.

Alerting Mechanisms: If your system has alerting mechanisms or notifications for job terminations or abnormal activities, review any alerts or notifications that were triggered around the time the job was terminated. These alerts might contain information about who triggered the termination.

Review System Changes: Check if there were any recent changes or updates to the system, job scheduler, or related components. Sometimes, changes in configurations, updates, or patches can inadvertently affect job executions or termination behavior.

Security Incident Investigation: If you suspect malicious activity or unauthorized access, consider conducting a security incident investigation. This might involve analyzing system logs, access controls, and other security-related data to determine if the job termination was part of a security incident.

If none of these strategies yield conclusive results, it might be challenging to determine who terminated the job without logs or explicit records. In such cases, you may need to implement additional monitoring, logging, or auditing mechanisms to track future job executions and terminations effectively.

Was this helpful?

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.