Hi everybody,
I was told that for transactional replication (see posts below) I need to
have snapshot scheduled to run for instance each night. But i dont
understand this.
This is my way of thinking how transactional replication should be
initiated:
- logreader, snapshot and distributer are stopped
- logreader is started so that it captures transactions that snapshot might
miss out on
- run snapshot immediately after logreader is started.
- snapshot starts doing its thing (copying the schema and the data in the
tables of the ddatabase). If for example snapshot has already processed
TableA and a change in data is made to TableA, logreader will pick this
change up and record it.
- once snapshot has completed its task, the distributer is started. The
distributer moves the snapshot to its destination and then reindexes the
tables. Finally it processes those transactions captured by the logreader.
Is this right?
I cant understand why the snapshot agent should be scheduled for
transactional replication, if the logreader is processing all future
transactions. My thought was that:
initial_snapshot
+
ongoing_transactions (as processed by the logreader)
=
current state of database
So why is there is a need to schedule snapshot for transactional
replication?
Any help in clearing up any of my misconceptions would be fantastic!
cheers, john
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23$2wX4c7FHA.3648@.tk2msftngp13.phx.gbl...
> The snapshot agent should be scheduled, perhaps each hour, or at a time
> when there are few users on your system. Note that a snapshot will only be
> generated if a subscriber needs one. Otherwise no snapshot will be
> generated. So, the only time you need to start this agent is when a
> subscriber needs one.
> The log reader agent should be running continuously.
> I normally run the distributation agent continuously. It doesn't matter in
> which order you start it.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "john r" <johnr@.trailer.com> wrote in message
> news:ucO85ub7FHA.956@.TK2MSFTNGP10.phx.gbl...
>
John,
the snapshot agent runs for initialization and reinitialization only. If you
have loads of anonymous subscribers where you have no idea when they'll come
online, then perhaps there is a case for frequent snapshots (is this what
was being referred to by whoever it was who told you that the snapshot agent
needs to run every night?), but most likely this isn't the case for you. In
my setup, we have only ever run the snapshot agent once on some
publications. Certainly the snapshot agents are all disabled and only run
manually when necessary.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment