tag:blogger.com,1999:blog-10312302.post2565488612202806479..comments2023-07-14T00:34:20.060-07:00Comments on TJay Belt's Thoughts: How long until the db shrink process is done?tjaybelthttp://www.blogger.com/profile/12931880332843056564noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-10312302.post-52274264345554562102013-09-04T17:59:47.045-07:002013-09-04T17:59:47.045-07:00Where estimated_completion_time > CURRENT_TIMES...Where estimated_completion_time > CURRENT_TIMESTAMP ?? You can't add that to Nick's query, you would get a Arithmetic overflow error converting expression to data type datetime.Supplement Prohttps://www.blogger.com/profile/13567656784706777898noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-27292643421695221502013-09-04T17:59:08.874-07:002013-09-04T17:59:08.874-07:00Where estimated_completion_time > CURRENT_TIMES...Where estimated_completion_time > CURRENT_TIMESTAMP ?? You can't add that to Nick's query, you would get a Arithmetic overflow error converting expression to data type datetime.Supplement Prohttps://www.blogger.com/profile/13567656784706777898noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-57521943467945178702013-03-05T07:23:38.016-08:002013-03-05T07:23:38.016-08:00a quick addition to Nick Larges comment/query.
I ...a quick addition to Nick Larges comment/query.<br /><br />I added a where statement to display all current jobs:<br /><br />Where estimated_completion_time > CURRENT_TIMESTAMP<br />Danhttps://www.blogger.com/profile/07763907701083305335noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-19990816470475911612012-06-29T10:37:59.968-07:002012-06-29T10:37:59.968-07:00Based on the info given in this post, here is a qu...Based on the info given in this post, here is a query that produces the information discussed:<br /><br />select session_id, command, round(percent_complete, 2) as percent_complete,<br /> ( (estimated_completion_time/1000) / 60 ) as estimated_completion_minutes_full,<br /> convert(varchar(5), <br /> Round((<br /> ( (estimated_completion_time/1000) / 60 )<br /> / 60 ), 1)) + ' hour ' +<br /> convert(varchar(5), <br /> (( (estimated_completion_time/1000) / 60 ) -<br /> (Round((<br /> ( (estimated_completion_time/1000) / 60 )<br /> / 60 ), 1) * 60))) + ' mins ' as estimated_completion_hours_mins,<br /> DATEADD(MI, ( (estimated_completion_time/1000) / 60 ), CURRENT_TIMESTAMP) as estimated_completion_clocktime<br /> from sys.dm_exec_requests <br /> where session_id = 75<br /><br />Thanks Aaron and TJ.Nick Largehttps://www.blogger.com/profile/05124148585369251196noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-24821680410888075802011-01-18T07:37:05.548-08:002011-01-18T07:37:05.548-08:00Fantastic! I've been sitting here waiting for ...Fantastic! I've been sitting here waiting for a 35 GB production backup to shrink and I thought it would never finish, now I know when it will, or atleast its getting closer ;)Patrickhttps://www.blogger.com/profile/07702253239666162197noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-78025438100204047252009-09-15T01:05:53.546-07:002009-09-15T01:05:53.546-07:00Thanks Guy! This is very useful for me..btw I adde...Thanks Guy! This is very useful for me..btw I added u in facebook.ျငိမ္းမိန္းကေလးhttps://www.blogger.com/profile/04661985191454573572noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-80145074561480737232009-01-14T14:58:00.000-08:002009-01-14T14:58:00.000-08:00You can also look at the estimated_completion_time...You can also look at the estimated_completion_time column. I think this is in milliseconds. Caution: this is marked as internal only according to BOL. But could still be useful info to pull.Aaron Bertrandhttps://www.blogger.com/profile/15922333882434296931noreply@blogger.comtag:blogger.com,1999:blog-10312302.post-32755661251106574642009-01-14T14:55:00.000-08:002009-01-14T14:55:00.000-08:00That's twice this week I've actually seen Twitter ...That's twice this week I've actually seen Twitter be useful. Now I'm hooked.Grantedhttps://www.blogger.com/profile/05127416848859901204noreply@blogger.com