Labels

Tuesday, 1 November 2016

Sys.dm_exec_requests - What is use of this DMV ?

This DMV will provide the information about each request that is executing with in the SQL Server.
To work with this DMV , the user should have VIEW SERVER STATE permission.

SELECT SESSION_ID
 ,percent_complete
 ,estimated_completion_time
FROM SYS.dm_exec_requests


Percent_complete will provide the completion details of the below activities i.e
ALTER INDEX REORGANIZE
AUTO_SHRINK option with ALTER DATABASE
BACKUP DATABASE
DBCC CHECKDB
DBCC CHECKFILEGROUP
DBCC CHECKTABLE
DBCC INDEXDEFRAG
DBCC SHRINKDATABASE
DBCC SHRINKFILE
RECOVERY
RESTORE DATABASE
ROLLBACK
TDE ENCRYPTION

No comments:

Post a Comment