SubscriberA goes from pending to active one the snapshot agent is done. The
next day SubscriberB gets a push subscription from the same publication. It
doesn't seem to go from pending to active until I re-run the snapshot agent
(it has status of waiting for snapshot). Is this by design or am I doing
something wrong? Do I need to run the snapshot agent immediately everytime
I add a subscriber if I want the subscriber to be active immediately?
Thanks
Mike Jansen
Why is it that when I add a new transactional subscription I must re-run the
snapshot agent before the subscription becomes active, even if the snapshot
agent has been run recently? Do changes to the database "invalidate" the
snapshot or am I doing something wrong?
Thanks,
Mike
"Mike Jansen" <mjansen_nntp@.mail.com> wrote in message
news:uk8qPdNVFHA.3184@.TK2MSFTNGP15.phx.gbl...
> If one day SubscriberA gets a push subscription, run snapshot agent, and
> SubscriberA goes from pending to active one the snapshot agent is done.
The
> next day SubscriberB gets a push subscription from the same publication.
It
> doesn't seem to go from pending to active until I re-run the snapshot
agent
> (it has status of waiting for snapshot). Is this by design or am I doing
> something wrong? Do I need to run the snapshot agent immediately
everytime
> I add a subscriber if I want the subscriber to be active immediately?
> Thanks
> Mike Jansen
>
|||Mike,
the snapshot files will be deleted by the distribution cleanup agent once
all the subscribers have read them. If you want this not to occur so
frequently, you can schedule the distribution cleanup agent to run less
frequently eg at 12pm and have the snapshot agent run once the cleanup has
finished.
Rgds,
Paul Ibison
|||OK, that explains it. Thanks you very much.
Since you had such a good answer, I have another question
Is there a way to detect via T-SQL whether a valid snapshot exists?
Obviously I can't base it on job statuses because even if jobs complete, the
distribution cleanup will cleanup the snapshot. Is there another status
table I can check?
I'd rather check before running the snapshot agent _every_ time a new
subscription is created (the whole process is done in T-SQL scripts).
Thanks again,
Mike
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:e0To7bXVFHA.3272@.TK2MSFTNGP10.phx.gbl...
> Mike,
> the snapshot files will be deleted by the distribution cleanup agent once
> all the subscribers have read them. If you want this not to occur so
> frequently, you can schedule the distribution cleanup agent to run less
> frequently eg at 12pm and have the snapshot agent run once the cleanup has
> finished.
> Rgds,
> Paul Ibison
>
|||Mike,
take a look at sp_browsesnapshotfolder (sp_browsesnapshotfolder
'testrepxxx'). It'll return a row if there is a publication snapshot
available. If it's been cleaned up there will be an empty recordset.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Excellent! I'll hopefully be testing/incorporating this at some point this
week. That was the last piece (for now!) in the replication part of my
database script framework. Thanks again.
Mike
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:ORAfK0hVFHA.3540@.TK2MSFTNGP15.phx.gbl...
> Mike,
> take a look at sp_browsesnapshotfolder (sp_browsesnapshotfolder
> 'testrepxxx'). It'll return a row if there is a publication snapshot
> available. If it's been cleaned up there will be an empty recordset.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
No comments:
Post a Comment