Hi Experts,
we are using sql server 2008 R2 SP2 on windows server 2008 r2, 64 bit.
Merge replication is the topology.
we have around 15 publications for 2 different databases. some publications require continuous sync and some are once in a day.
so, the metadata cleanup and subscription expiry was set to to never expire. this setting is adding up lots of records to the three system tables
msmerge_tombstone
msmerge_genhistory
msmerge_contents.
so Iam doing a manual weekely change of the setting to 5 days (on Friday), and keeping it back to never expire on monday.
I understand that, I can always keep the setting as 5 days and let it leave, but with any reason if there is no sync, subscriptions will get expired, and will removed.
so I just want to automate this setting. every friday, it should change to 5 days retention, and then monday, to never expire.
I even thought about creating a job to execute the stored procedure sp_mergemetadataretentioncleanup,instead of chaning these settings. but this is required upto only sql server 2000.
so please suggest the best approach.
thanks in advance.
Cheers, Vinod Mallolu