We have a performance issue with the current transactional replication setup on sql server 2008. When a new snapshot is created and the snapshot is applied to the subscriber, we see network utilization on the publisher and the distributor jump to 99%, and we are seeing disk queues going to 30 This is causing application timeouts.
Is there any way, we can throttle the replicated data that is being sent over? Can we restrict the number of rows being replicated? Are there any switches which can be set on/off to accomplish this?
Thanks!
Our DBA has forced us to break down dml code to run in batches of 50000 rows at a time with a couple of minutes in between. He plays with that batch size time to time but this way our replicating databases are ok. For batching, everything has to go into temp tables, a new column (name it Ordinal) that does row_number(), and then a BatchID to be like Ordinal / 50000. Finally comes a loop to count BatchID and update target table batch by batch. Hard on devs, easier for DBAs and no need to pay more for infrastructure.