SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Table lock on MSmerge_contents


Table lock on MSmerge_contents

Author
Message
arnipetursson
arnipetursson
Mr or Mrs. 500
Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)

Group: General Forum Members
Points: 553 Visits: 1019
We are running merge replication over a WAN.
Only changes to the Subscriber are replicated to the Publisher ( -ExchangeType 1 ).
We are using pull subscriptions

When the merge agent is selecting records from the MSmerge_contents on the subscriber to pull data to the publisher, we are getting Table locks on MSmerge_contents.
This in turn blocks writes to the tables because the triggers are blocked. These can last as long as 1500ms and more, negatively affecting the application writing at the subscriber.
I have uploadwritechangesperbatch, uploadwritechangesperbatch and uploadgenerationsperbatch all set to 1000 for increased performance.
Should I reduce the setting of uploadgenerationsperbatch?

All indexes on the meta data tables are rebuilt every night. I also keep the meta data tables trimmed to 14 days of data.

Any ideas as to how I can avoid the table lock is appreciated.
arnipetursson
arnipetursson
Mr or Mrs. 500
Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)

Group: General Forum Members
Points: 553 Visits: 1019
I am testing reducing the value for uploadgenerationsperbatch.
I will update once I have conclusive results.

In the meantime any insights from the community would be appreciated.

Thanks,
-ap
arnipetursson
arnipetursson
Mr or Mrs. 500
Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)

Group: General Forum Members
Points: 553 Visits: 1019
After testing with uploadgenerationsperbatch set to 10 and 20, I still see table locks,
but they are shorter in duration (100-500ms as opposed to 1-5 seconds).
However I am getting 30-40% less throughput.

I will be testing with uploadgenerationsperbatch set to 50 and 100 later in the week,
once my remote site is back on line.

Does anyone have any insights?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search