Quantcast
Viewing all articles
Browse latest Browse all 12963

Agent Job with "Truncate" statements hung.

While I was on vacation a multi step Agent Job hung on step two. This step contains several "truncate" statements. A subsequent job step re-populates the truncated tables. 

This Job has been successfully running daily for some time, so when it hung, my replacement killed the job (and much else) and after two attempts ran the job to successful completion.  No one bothered to collect blocking/lock data.

From what I have gathered a week later, I believe that the Truncate statements were waiting for locks to be released from the table(s) in question. No other job should be updating the tables but some users could be querying these tables (Ex. Excel).  These are not particularly large tables so queries should run quickly.  But the blocking did persist for several minutes before the job was killed. 

Someone else has decided that the job was hanging because it was started with msdb.dbo.sp_start_job rather than with its own Schedule.  I question this conclusion based on my experience and the fact that we have a history of using this technique.

Please let me know what you think.

Michael

 


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>