Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Restore taking longer and longer

Author  Topic 

ringworm
Starting Member

6 Posts

Posted - 2008-02-04 : 06:28:33
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

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-04 : 23:11:56
How big the db is?
Go to Top of Page

ringworm
Starting Member

6 Posts

Posted - 2008-02-05 : 08:18:47
about 30gb
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-05 : 22:50:49
Check disk i/o, and network traffic if restore from remote file.
Go to Top of Page
   

- Advertisement -