Tag: SQL
TSQL - What is running and percent complete
by admin on Oct.05, 2009, under Dev Data Tech, Misc Items
Here is a quick little snippet of TSQL; what is running and that percent complete. This comes from using dm_exec_requests and the percent complete value there.
select T.text,
R.Status,
R.Command,
DatabaseName = db_name(R.database_id),
R.cpu_time,
R.total_elapsed_time,
R.percent_complete
from sys.dm_exec_requests R
cross apply sys.dm_exec_sql_text(R.sql_handle) T