Browse the archive

SQL Agent

Consuming SQL Agent dates & durations

SQL Agent’s schema is older than me. It handles dates, times, and durations like it’s 1980 by using integers instead of date/time data types. My buddy Aaron Bertrand talks more about Dating Responsibly so that you can have a good datetime with your own …

Continue reading

Job to stop other job at specific time

Question We have a job which imports data daily from a remote SQL Server every night, I'll call it Import-Job. Most of the time this job runs through in about 15 minutes and everything is fine but due to a rather unstable VPN connection sometimes the job …

Continue reading

xp_sqlagent_enum_jobs alternative

What's xp_sqlagent_enum_jobs? If you landed on this post, I'm guessing you know the answer to this, so I'll be quick. `xp_sqlagent_enum_jobs` is an undocumented (and thus, unsupported) extended procedure that gives information on whether a job is currently …

Continue reading

Really Long Descriptions on SQL Agent Jobs

WARNING: Silent truncation ahead Have you ever tried to enter a really long description on a SQL Agent job? Maybe you were trying to put some sort of warning to people who might be trying to edit the job, or triage info for when the job fails. (Ok, so this …

Continue reading