SQL Agent Job: Determine how long it has been running
问题 The Scenario There are certain SQL Agent Jobs that are scheduled to run every few minutes throughout the day. There are legitimate times when it will miss its next schedule because it's still running from the previous schedule. Every once and a while, a job might 'hang'. This doesn't produce a failure (since the job hasn't stopped yet). When this happens, the job can be manually stopped and works fine the next time it runs. It's designed to pick back up where it left off. What's the most