15分钟15个SQL Server复制的技巧

15分钟15个SQL Server复制的技巧

 

翻译自:

15 SQL Server replication tips in 15 minutes

 

这个技巧和窍门的列表将帮助你增强复制技术。它分为三个部分:性能、监控和其他。

 

记住,事务复制提供了所有复制类型最佳性能。大多数时候,客户端使用快照或合并复制而事务复制时最佳选择。例如,如果数据不是频繁修改,如果大批量的数据修改,或者客户端不需要一个实时更新的数据集,你可以使用快照复制。

 

在所有其他情况下,事务复制只认为是通过网络传输对客户端的修改。快照每次会发送整个数据集(很有可能上GB),而事务则会以MB发送。如果你在低带宽复制,区别将非常明显。

 

复制技巧:性能

1. Replicate tables without primary keys

2. Achieve bi-directional replication

3. Replicate stored procedure execution

4. Create lightweight tables on the subscriber

5. Put subscription database in Bulk Logged recovery model

6. Use the independent agent option

7. Change your polling interval

8. Maintain your log

9. Set performance profiles

 

复制技巧:监控

1. Check subscriber status with Replication Monitor Group

2. Expire subscribers

 

复制技巧:其他

1. Replicate to objects with different schemas

2. Reveal replication commands

3. Check number of commands to be replicated

4. Prevent updates, inserts and deletes from being replicated