SELECT r.wait_type
command, s.text, start_time, percent_complete, CAST(((DATEDIFF(s,start_time,GetDate()))/3600) as varchar) + ' hour(s), '+ CAST((DATEDIFF(s,start_time,GetDate())%3600)/60 as varchar) + 'min, '+ CAST((DATEDIFF(s,start_time,GetDate())%60) as varchar) + ' sec' as running_time, CAST((estimated_completion_time/3600000) as varchar) + ' hour(s), '+ CAST((estimated_completion_time %3600000)/60000 as varchar) + 'min, '+ CAST((estimated_completion_time %60000)/1000 as varchar) + ' sec' as est_time_to_go, dateadd(second,estimated_completion_time/1000, getdate()) as est_completion_time FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) s WHERE r.command in ('RESTORE DATABASE')
commandstart_timepercent_completerunning_timeest_time_to_goest_completion_time
BACKUPTHREAD2014-05-29 17:16:45.9436.2642070 hour(s), 31min, 6 sec7 hour(s), 44min, 35 sec2014-05-30 01:32:26.807
Hey ,
I am restoring the database from network share to my development server. Its been extremely slow.The estimated completion time is about 8 hours and it used to take lot less in the past.
The SQL Server is running under the account which has all the privileges to do instant file initialization. I verified that.
I copied some files from network share and it looks fine. Network speed doesn't look too bad. My memory ( 12 GIG ) and Processor ,etc look OK. I verified those through Resource Monitor.
Is there a query or any other Diagnostic Tool I can use to figure out where the bottleneck for such a slow database restore?
select @@VERSIONMicrosoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)
Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
Thanks in advance.
I90Runner