Replication Filtering

  • I am new to replication and was wondering if you had a table replicated with a filter of last 5days worth of information, does the replicated database keep a hold of data over 5days or does it purge itself to keep a rolling 5days....?

    any help much appreciated.

    _________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie

  • For transactional replication, it does not purge the older data. You need to either re-snapshot, or create your own purge procedure. Be careful not o purge anything more recent than what your filter is allowing through. otherwise you'll get an error if replicaion tries to update a record that you've purged.

    Snapshot replication, by definition, will purge & repopulate each time it's run (filter or no filter0.

    Easy enough to test though. Set up a little test version & try it out.

  • Thanks for that, i think i'll look to create a job to tidy it up overnight. Its a shame it doesn't "keep it in sync" using transactional replication - i thought it was a bit smarter than that......:hehe:

    _________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie

  • I know that Merge replication will remove anything not matching the applied filtered. We have a table published that contains file objects and applied a -1 internal business ID filter to it. Any new records added on subscribers will have a positive internal ID so during the sync the new records are uploaded. Then when the subscriber downloads any changes the filter deletes the newly added records from that table because its internal business ID isn't -1.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply