引起快照重新初始化的原因
1
添加一个article到发布pub1,点击“查看快照代理状态”,发现pub1中所有的aritlce都生成了快照…
在发布库执行
select immediate_sync From syspublications
or
sp_helppublication
发现immediate_sync为1. 将immediate_sync改成0即可:
sp_changepublication @publication = 'publicationName'
, @property = 'immediate_sync'
, @value = false
, @property = 'immediate_sync'
, @value = false
原因,可能是在添加发布时选中了immediate_sync选项
2
发现某些(事物)发布总是定期(例如每天生成一次快照)生成快照,
在发布服务器上执行sp_helpsubscriberinfo
发现其中一个订阅的frequency_type为4
在发布库执行下列语句即可
sp_changesubscriber @subscriber= 'subscriberservername'
,@frequency_type= 64
,@frequency_type= 64
相关解释
- [ @frequency_type=] frequency_type
-
Is the frequency with which to schedule the distribution task. frequency_type is int, and can be one of these values.
Value
Description1
One time
2
On demand
4
Daily
8
Weekly
16
Monthly
32
Monthly relative
64
Autostart
128
Recurring