Quantcast
Channel: kristofdba – kristof dba
Viewing all articles
Browse latest Browse all 26

sys.dm_exec_requests => check your requests progress!

$
0
0

Some nice DMV’s exists to check what is running. It used to be somewhat hard to retrieve this kind of info from SQL server. those days are over !

This script gives you the progress of any restore database operation.
Th DMV dm_exec_sessions holds the info about the session that executed the request.

select
e.login_name,
r.percent_complete,
r.Command
from sys.dm_exec_requests r
Left outer join sys.dm_exec_sessions e on e.session_id = r.session_id
where r.command ='restore database'



Viewing all articles
Browse latest Browse all 26

Trending Articles