Friday 17 February 2017

How to find restore database percentage in SQL server

select percent_complete, DATEADD(ss,estimated_completion_time/1000,getdate()) AS estimated_completion_time
from sys.dm_exec_requests where command like '%Restore%'

No comments:

Post a Comment

Check if column exists or not in the SQL server

--method 1 IF EXISTS(SELECT 1 FROM sys.columns with (nolock)           WHERE Name = N'LoginName'           AND Object_ID = Objec...