SQL SERVER Query to Find Status competed of Backup /Restore or any process in Server

Hi All

some times when we run the backup or restore of big databases  it will take time and we need to know the status of that task then please run the below query which will the percentage complete .


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


 

Comments

Popular posts from this blog

SQL Server MDS : How to Know Actual MDS Table name for Model Entity and Column name for the Attribute

SSIS : Hresult: 0x80004005 Description: "Invalid character value for cast specification".

SSRS : [Teradata Database] 3939 There is a mismatch between the number of parameters specified and the number of parameters required.