|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 4:52 PM
Points: 1,379,
Visits: 2,626
|
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:11 PM
Points: 3,390,
Visits: 3,403
|
|
dgabele (5/18/2010) Once a job completes (100%), it no longer appears in the dmv right? Am I correct in understanding that the DMV only shows currently executing requests?
Thanks
I think had the same confusion. I read the question as to check the completion status of the backup after it had completed. Not as an ongoing monitoring of the progress of the task.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, January 01, 2013 11:12 PM
Points: 248,
Visits: 372
|
|
Yes, it is good question but where and how we can use this? Anybody can explain with an example?
KSB ----------------------------- Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 1:32 AM
Points: 3,187,
Visits: 4,140
|
|
Kari Suresh (5/19/2010) where and how we can use this? Anybody can explain with an example? For example, it may be very useful when a big transaction rolls back and you want to know the progress status of the rollback. Here is a simple example. First of all, let's create a table and fill it with the data (it took 5 minutes on my local machine, and 1800 MB on the hard drive (800 MB for the data file and 1000 MB for the log file)).
SET NOCOUNT ON GO CREATE TABLE RollbackTest (a CHAR(8000)) GO BEGIN TRANSACTION GO INSERT RollbackTest VALUES ('test') GO 100000 Here we have a huge uncommitted transaction. Let's roll it back (it took 6 minutes on my local machine):
ROLLBACK TRANSACTION We can monitor the rollback progress in another window:
SELECT percent_complete, * FROM sys.dm_exec_requests WHERE session_id = <spid of the rollback process> Also we can monitor the progress of backups/restores/etc.
Of course, we can't see the execution progress of queries (such as SELECT/INSERT/UPDATE/etc).
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, August 13, 2012 10:04 AM
Points: 554,
Visits: 861
|
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, August 13, 2012 10:04 AM
Points: 554,
Visits: 861
|
|
Thanks vk-kirov For the Example
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: 2 days ago @ 1:46 PM
Points: 18,732,
Visits: 12,329
|
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: 2 days ago @ 11:53 PM
Points: 738,
Visits: 1,124
|
|
Thanks Jason and everyone for putting up your valuable suggestion and comments. Many Thanx. Might be the question looked a little confusing due to the keywords which I used (E.g, table in place DMV), well, I am pretty good to see our experts are not only experts infact they are indeed a good MENTOR.
I am pleased to see that my question has been published.
Moreover, your postive feedback always help me to put up new questions and make me encourage to clarify the doubts of the other users.
Thanks.. Thanks & Thanks@!!
Thanks.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
vk-kirov (5/19/2010)
Kari Suresh (5/19/2010) where and how we can use this? Anybody can explain with an example?For example, it may be very useful when a big transaction rolls back and you want to know the progress status of the rollback. Here is a simple example. First of all, let's create a table and fill it with the data (it took 5 minutes on my local machine, and 1800 MB on the hard drive (800 MB for the data file and 1000 MB for the log file)). SET NOCOUNT ON GO CREATE TABLE RollbackTest (a CHAR(8000)) GO BEGIN TRANSACTION GO INSERT RollbackTest VALUES ('test') GO 100000 Here we have a huge uncommitted transaction. Let's roll it back (it took 6 minutes on my local machine): ROLLBACK TRANSACTION We can monitor the rollback progress in another window: SELECT percent_complete, * FROM sys.dm_exec_requests WHERE session_id = <spid of the rollback process> Also we can monitor the progress of backups/restores/etc. Of course, we can't see the execution progress of queries (such as SELECT/INSERT/UPDATE/etc).
Very Nice explanation. Answered alot of questions and confusions. And Very informative QOTD Saurov. Thanks.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sometimes, winning is not an issue but trying. You can check my BLOG here
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:08 AM
Points: 7,074,
Visits: 7,110
|
|
Nice question (I saw it after the change from "table"). Nice example from vk_kirov made it clear how it can be used.
Tom Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|