February 4, 2008 at 3:08 am
The following code is taking longer and longer to run. I am not talking about the gradualy increase in size. this job has been taking 30-40 mins normaly and in the last few days it has gone 1hr to 2 hr to 3 hr... ANy ideas why this is happening? I can not see and other jobs running at this time.
declare @filename varchar(255)
set @filename =
(select top 1 physical_device_name
from ****.msdb.dbo.backupset bs, ****.msdb.dbo.backupmediafamily bf
where bs.media_set_id=bf.media_set_id
and database_name = 'Live_PRD'
and backup_start_date>getdate()-1
and type = 'D'
order by backup_start_date desc)
restore database REPORTS_REP
from disk=@filename
with
move 'LIVE_PRD_Data' to 'T:\SOUTH\REPORTS_REP_Data.mdf',
move 'LIVE_PRD_Log' to 'U:\SOUTH\REPORTS_REP_Log.ldf',
move 'LIVE_PRD_Log2' to 'U:\SOUTH\REPORTS_REP_Log2.ldf',
replace, stats=2, recovery
February 4, 2008 at 9:53 am
I would like to check the disk space on T and U drives first, if I were you.
February 4, 2008 at 10:11 am
Thanks for that what is your reasioning to it takeing longer due to disk space?
February 5, 2008 at 11:17 am
When free space of a drive falls below a threshold, the performance will degrade.
One of its reasonings is that Windows uses hard disk to save something temporarily. My experiences show that low free space of a drive can take several times of period to complete the same task.
That is the reason why I will check the free space on those related drives.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply