Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9760

Re: Primary / foreign key replication

$
0
0

1) You could delay the application of your transactions via dsi_timer however ...

 

- this only goes down to the minute

- this would delay all transactions into the replicate

- this will exacerbate the problem if you have any RI contraints in the other direction

 

---------------------------

 

2) You could configure your DSI connection to retry the transaction X number of times:

 

- alter the error class that's assigned to your DSI connection and assign the action 'retry_stop' to the error # you're seeing in the repserver errorlog (eg, Msg 546 == FK key constraint violation) [NOTE: if you're using the default rs_sqlserver_error_class then I'd recommend creating a new/custom error class and modify it (as opposed to modifying the default class)]

 

- configure your DSI connection with command_retry = 10/20/40/100 (you'll have to test with different numbers to see which one works best for you)

 

Keep in mind that this configuration basically tells the repserver to spin in a tight loop retrying the transaction until either a) it completes successfully or b) you hit 'command_retry' times through the loop and then the repserver stops trying to play the transaction (ie, DSI goes down)

 

---------------------------

 

3) Implement a monitoring script that attempts to restart suspended DSIs.

 

---------------------------

 

At my current client we've implemented a combination of #2 (retry_stop + command_retry) and #3 (monitoring script that issues 'resume connection').


Viewing all articles
Browse latest Browse all 9760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>