SQL SERVER为 2005 SP2,数据库每天大概有20G的日志,基本都是默认配置。
在备库RESTORE的时候,一次执行数个小时也无法还原,JOB中有如下信息,当然还无法判断是否就和此有关,
2010-09-26 13:10:16.11 Retrieved database restore settings. Secondary Database: 'Bk5173', Restore Delay: -2000000000, Restore All: True, Restore Mode: Standby, Disconnect Users: False, Last Restored File: //ip/Logshipping/dbname_20100925214215.trn, Block Size: Not Specified, Buffer Count: Not Specified, Max Transfer Size: Not Specified
查了一些资料,在备库上修改了log_shipping_secondary_databases表的一个值 ,不过像需要重启服务才起作用(保留)
use [msdb];
update dbo.log_shipping_secondary_databases
set [restore_delay] = -2000000000;
In short, there's a bug in the SQLLogShip application. Sometimes depending on the machine time it gets a negative number and checks if it's less than tha value of the msdb.dbo.log_shipping_secondary_databases.restore_delay column.