Viewing 4 posts - 1 through 4 (of 4 total)
When run_duration exceeded 100 hours than LEN(run_duration)>6..
The end time could be counted like this:
DATEADD(second,
[run_duration]/10000*3600+[run_duration]%10000/100*60+[run_duration]%100,
STR(run_date,8)+' '+STUFF(STUFF(RIGHT(1000000+run_time,6),5,0,':'),3,0,':'))
March 22, 2007 at 2:07 am
I don't know the way to get end time,
but I think, the simpliest way to get starting datetime from sysjobhistory is:
STR(run_date,8)+' '+STUFF(STUFF(RIGHT(1000000+run_time,6),5,0,':'),3,0,':')
or
CONVERT(DATETIME,STR(run_date,8)+' '+STUFF(STUFF(RIGHT(1000000+run_time,6),5,0,':'),3,0,':'))
.
March 21, 2007 at 3:31 pm
You are querying msdb database, but what if it was restored manually.
Not by SQL agent job.
Piotr
November 23, 2006 at 8:51 am
I think, this topic is about backing up databases (database files) with Volume Shadow Copy and SQL 2000 support, so why to talk about Visual SourceSafe ?
June 14, 2006 at 3:38 am
Viewing 4 posts - 1 through 4 (of 4 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy