Replication & filtering

  • Hi,

    I have the following scenario:

    I want to replicate a database using transactional replication.

    The database which publishes the data, has to keep the last year's data

    This is not a calendar year it will be: year=today-365

    The subscriber needs to keep 5 years worth of data.

    There will be a job running every night, to delete the data older than a year on the publisher, but

    as you can see I dont want to replicate these deletes to the subscriber.

    A similar job will run on the subscriber deleting data older than 5 years.

    The normal opertations (deletes, inserts, updates) on the publishing database,

    that the users will make using an application, still needs to be replicated to the subscriber.

    Any suggestions on how to accomplish this?

  • You can configure transactional replication not to replicate delete actions.

    When you add the article to the publication, specify 'none' in the delete command stored procedure.

     

    @del_cmd  = 'NONE 'parameter if you are using sp_AddArticle stored procedure, or from EM in the properties of the publication, in the articles tab and then in the commands tab.

Viewing 2 posts - 1 through 1 (of 1 total)

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