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

SSAS : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient). + Solution

SSIS Error : Unable to infer the XSD from the XML file. The XML contains multiple namespaces