I've got transactional replication configured from a database called DBProd to another database called DBWarehouse ; everything works fine, and transaction are usually replicated instantaneously to the warehouse .... which is my problem.
I'd like to add a slight delay to the replication (something like 10 minutes), so that the replicated database can be used to access a previous version o开发者_开发问答f the database (in case a bug occurs for example)
Is there a simple way to achieve this ?
There is not a way to add a delay per transaction. You can change the pollinginterval parameter for the distribution agent (http://technet.microsoft.com/en-us/library/ms147328.aspx) to be longer, but all transactions made up until the polling time would be moved.
Note that delaying the polling interval also delays the ability of you to clear out the inactive portions of the transaction log. The log records will not be inactive until they are moved, so plan for that.
This is similar to the log shipping delay. Everything up until the log backup is sent over and all restored at that time.
If you are looking for something like 1:00 make change A on primary 1:10 make change b on primary 1:30 move change A to secondary 1:40 move change B to secondary
you cannot do this. The transactions are moved in batches, not according to some delay based on that time of the transaction commit.
You should be able to do this in the Subscriber Scheduling options.
精彩评论