Groups | Blog | Home
all groups > sql server replication > october 2005 >

sql server replication : snapshot re-intialize itself



Raymond Mak [MSFT]
10/6/2005 6:50:02 PM
Hi maxzsim,

The snapshot agent will run according to the schedule you specified
(probably the default in your case) for it when you created the publication.
And for a transactional publication, a snapshot will be generated when the
snapshot agent runs if:

1) the immediate_sync publication property is set to 1. This means that a
generated snapshot is available for initializing any subsequent new
subscriptions.
2) there are deactivated (through manual reinitialization or deactivation by
the distribution cleanup agent because the distribution retention is past) or
new subscriptions requiring reinitialization.

One thing that you may want to make sure is that your subscription wasn't
deactivated by the distribution cleanup agent since the distribution
retention setting is different from the publication retention setting. And if
your immediate_sync publication property is set to 1, the generated snapshot
will not be delivered to any of your existing subscribers although you did
pay for generating it.

HTH

[quoted text, click to view]
maxzsim via SQLMonster.com
10/6/2005 11:59:41 PM
Hi,

I have set up a txn replication with the default subscription of 336 hours
before it expires. the initial snapshots generated 78 articles. The
replication has been going on quite successfully but over the past few 3 -4
days i did not check and yesterday , i realised that the snapshots were re-
created again

what i need to know is
1) under what condition will the snapshots be recreated again ?
2) and how can i prevent this from happening so that i can always replicate
only the differences and not the whole bulk of data again ?

appreciate ur kind advice

tks & rdgs
maxzsim via SQLMonster.com
10/10/2005 8:45:34 AM
Hi ,

I can see that a snapshot has been automatically scheduled to be created
once per nite.
but where or how can i check what's my snapshot immediate_sync publication
property is 1 or not ?
and also where to check the distribution rentention settings ?

i actually dun quite get ur previous reply
Do you mean if the distribution retention period is over , a new snapshot
will re-create all the articles again ?

if not exceeded then a snapshot consisting of the changes will be created
only ?

FYI : my subsscription expiration has been set to 336 hours


tks & rdgs

[quoted text, click to view]


--
Message posted via SQLMonster.com
Raymond Mak [MSFT]
10/10/2005 10:09:03 AM
Hi Maxzsim,

1) You can either select the immediate_sync property value from the
syspublications table at the publisher or you can see whether the "Snapshot
files are always available to initialize new subscriptions immediately"
check-box on the "Subscription Options" tab of the "Publication Properties"
dialogue (right-click on publication) is checked. Since you don't have a new
snapshot generated every night, it appears that the immediate_sync
publication property is set to 0.
2) The distributor retention settings can be selected from the
msdb..MSdistributiondbs table. There are two settings: a max and a min. The
max value is the one that you should pay attention to. You can also access
these values from Enterprise Manager by right-clicking on the "Replication"
folder->Select "Configure Publishing, Subscribers, and
Distribution..."->Select "Distributor" tab->Select the distribution database
you want to examine->Click on the "Properties" button. From what you have
described previously, the retention period that you mentioned is likely to be
the publication retention (or more appropriately the subscription retention)
and it governs when a subscription should be "dropped" if there is a lack of
activity for an extended period of time whereas the distributor retention (or
more appropriately the replicated transaction retention) is used by the
distribution cleanup agent to determine how long a replicated transaction
should stay in the distribution database. If the distribution cleanup agent
removes transactions that are required for keeping certain subscriptions
synchronized because they are past the max. distribution retention, the said
subscriptions will be "deactivated" and would required a new snapshot to
resyncrhonize them again.

It would appear that your subscription was deactivated by the distribution
cleanup agent, and you can see if that was the case by checking if the
distribution cleanup history has a message along the line of "deactivated n
subscriptions...". If your subscription was indeed deactivated by the cleanup
agent, you can either schedule your distribution agent to run more frequently
or increase the max distribution retention value (note: this can increase the
size of the distribution database.)

-Raymond


[quoted text, click to view]
AddThis Social Bookmark Button