Filter columns whilst Replicating

  • Hello, I have two SQL servers (SQL 2000) performing a two-way continuous merge replication. Currently using data partitioning to avoid any data conflicts (i.e. two different primary key ranges).

    The problem is I want to have columns which the contents are not replicated, but are referred to by stored procedures. (That is - columns which the contents are local to the server)

    Currently to set up the replication I copy the schema and data to the subscriber server. Delete the subscription and then re-set the primary keys on the subscriber. Then re-apply the subscription, this time choosing not to copy over the scheme and data at the start. This is working fine and allows me to set up two-way replication.

    I now have a column the content of which I want to be different depending on the local server. This column is used in a number of stored procedures. However when I select a column not to be replicated (using the filter column tab within properties – untick the checkbox) before trying to re-apply the subscription I have the following error:

    quote:


    β€˜The schema definition of base table 'dbo'.'TblPubFolder' at the Subscriber does not match the table in the Publisher database. Re-establish the subscription after recreating the base table to match the table at the Publisher.’


    I have also tried applying the column filter whilst setting up initial subscription, however it then fails as the column is reference by a number of stored procedures.

    Can anybody help?

    Thanks

  • If you don't replicate the column to the replication server, I think you're stuck. You could write custom handlers to handle the replicated data and edit it when it's imported. NEver done it. Have read about it online.

  • OK, does anyone have any suggestions in how to replicate databases where some columns are common (i.e. replicated) and some columns are local. Is it possible to edit the stored procedures which do the replication to comment of the relevant columns (looks tempting, but I haven't had time to try it out)?

    Anyone have any ideas?

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

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