Transactional Replication on a table carrying incompatible data type

  • Hi folks,

    I am trying to implement a transactional replication in 2008. Both the publisher and subscriber are in 2008 version.So far so good.

    The publisher database is in 2005 compatibility mode. It has a table which has two columns with the data type 'date' which is new in 2008. So for the replication, when bcp files are generated while taking initial snapshot, because the publisher is in 2005 mode, it generates a snapshot thinking that it is going to apply the same on a 2005 mode db and thus the snapshot fails because 'date' data type is not supported in 2005.

    Please suggest some remedy other than changign the compatibiliy level. Is there any option which i can choose to tell the snapshot agent that it should generate snapshot for a true 2008 susbcriber.

    Thanks in advance!

    Chandan Jha

  • I know replication a a bit tricky subject. So I am requesting all of you to atleast give some hint even if you do not know the complete answer.

  • You can try using the @schema_option parameter for sp_addarticle to map new data types to older versions:

    From http://msdn.microsoft.com/en-us/library/ms173857.aspx:

    Schema option value: 0x200000000

    Description:

    Converts date and time data types (date, time, datetimeoffset, and datetime2) introduced in SQL Server 2008 to data types that are supported on earlier versions of SQL Server.

    And if you have multiple versions in your replication topology go through this: http://msdn.microsoft.com/en-us/library/ms143241(v=SQL.100).aspx

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

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