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.
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_idand database_name = 'Live_PRD'and backup_start_date>getdate()-1and type = 'D'order by backup_start_date desc)restore database REPORTS_REPfrom disk=@filenamewith 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? |
 |
|
ringworm
Starting Member
6 Posts |
Posted - 2008-02-05 : 08:18:47
|
about 30gb |
 |
|
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. |
 |
|
|
|
|