April 26, 2012 at 4:47 am
Transactional Replication - The initial Snapshot ran for 5 hours during which time the Transaction Log went full although hourly Log backups ran successfully.
My understanding is that committed transactions are written to the Distribution Log and I would expect there to be no influence on the DB's Transaction Log. In reality it looks like, when starting replication it puts a "lock" on the transaction log until the next Log Reader completes. Can anyone help with an explanation of the internal workings?
April 26, 2012 at 5:10 am
Once you start replication, any new transactions are marked as 'to be replicated' and need to be picked up and copied by the log reader before the log can be truncated.
If the snapshot takes too long, consider init from backup.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 26, 2012 at 5:59 am
Thank you, I think I have it now; While the Snapshot is taking place all newly committed transactions are marked "to be replicated". On completion of the Snapshot, the Log Reader will a) copy "to be replicated" transactions to the Distribution Log, and b) remove "to be replicated" and the log can then be cleared after the next backup
April 26, 2012 at 6:05 am
The log reader doesn't copy transactions to the distributor's log. It copies them to the distributor database.
Other than that, pretty much. That's how transactional replication works. Changes are marked as to-be replicated, log reader picks them up from the publisher's transaction log and copies them to the distributor.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply