Skip to content

Instantly share code, notes, and snippets.

@regme
Last active August 29, 2017 13:14
Show Gist options
  • Select an option

  • Save regme/d3e5b267d70818965ebdaefd05a2517a to your computer and use it in GitHub Desktop.

Select an option

Save regme/d3e5b267d70818965ebdaefd05a2517a to your computer and use it in GitHub Desktop.
JobLog info
select *, Name + ' is running for ' + CONVERT(varchar(10),DATEDIFF(minute,startdate, getutcdate()), 114) + ' minutes on [Advisory_Fact_Test]' from [Advisory_Fact_Test].dbo.JobLog
where stopDate is null and startdate > getutcdate() - 7
union all
select *, Name + ' is running for ' + CONVERT(varchar(10),DATEDIFF(minute,startdate, getutcdate()), 114) + ' minutes on [AdvisoryFact]' from [AdvisoryFact].dbo.JobLog
where stopDate is null and startdate > getutcdate() - 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment