Introduction
Many times as a developer, I struggled to find the progress of my database restore process. Finally one of my colleague helped me to find a way to see the DB restore process progress.
Returns information about each request that is executing within SQL Server.
Executing sys.dm_exec_requests in master DB rreturns information about each request that is executing within SQL Server.
sys.dm_exec_requests
Using the code
A brief description of how to use the article or code. The class names, the methods and properties, any tricks or tips.
Blocks of code should be set as style "Formatted" like this:
USE Master
GO
SELECT percent_complete FROM sys.dm_exec_requests;
SELECT percent_complete FROM sys.dm_exec_requests
OR
SELECT percent_complete FROM sys.dm_exec_requests WHERE session_id = 80
For more details
http://msdn.microsoft.com/en-us/library/ms177648.aspx.