Steps to replicate to different schema


  • Can someone please provide the steps for implementing the following:  transaction replication to a different schema.  By this I mean the schema on the subscriber is somewhat different from the publisher, vis a vis the following scenarios:

    1) subscriber column name is different than publisher column name, data type is same in both, table name is same in both

    2) subscriber data type is different than publisher data type (eg: int32 vs smallint, nvarchar to varchar), column name is same in both, table name is same in both

    3) subscriber table name is different than publisher table name, table schemas are same for both

    I have searched the web and found almost nothing about mapping during replication.  What I did find is howto perform column filtering in the New Publication Wizard (which is akin to sp_addarticle & sp_addarticlecolumn), but this wizard does not offer mapping between publisher & subscriber of table names, column names, or data types.

    Thanks in advance for your help.



    Friday, November 23, 2012 9:04 PM


  • Short answer, you can't or it is extremely difficult. You will be extremely unhappy with the result.

    The best way to accomplish what you are trying to do is create a subscription exactly how it is on the publisher and create a view on the target to change the field names, data types, etc.  This can be done between 2 different "owners" or databases.

    Monday, November 26, 2012 8:55 PM