locked
Merge replication - table with geography data type RRS feed

  • Question

  • Hi,

    I have a problem with geography data type replication. Any change that is done on a Geography column breaks the replication - the error message is "The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber." I double checked compatibility settings that is suggested here: http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/d8e31621-5d43-48cd-bdd3-c02b8a24625c. But both publisher and subscriber are 100RTM.

    I checked synchronization logs and found a strange message - attempt to convert varchar to geography. I don't understand from where the varchar data type comes from. Tables at subscriber and publisher has the same format - geometry stored in geography data type.

    2010-09-20 18:36:22.499 The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber. This can occur when there are pending DDL changes waiting to be applied at the Subscriber. Restart the Merge Agent to apply the DDL changes and synchronize the subscription.
    2010-09-20 18:36:22.845 Category:NULL
    Source:  Merge Replication Provider
    Number:  -2147199398
    Message: The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber. This can occur when there are pending DDL changes waiting to be applied at the Subscriber. Restart the Merge Agent to apply the DDL changes and synchronize the subscription.
    2010-09-20 18:36:23.005 Category:SQLSERVER
    Source:  VIA-IWSDB
    Number:  8114
    Message: Error converting data type varchar to geography.

    The only difference between subscriber and publisher are versions:publisher: 10.0.1600.22, subscriber 10.0.2531.0. So version(publisher) < version(subscriber). Can this cause the problem?

     Thanks, Petr


    petr
    Monday, September 20, 2010 8:46 PM

Answers

  • Hi Petr,

     

    According to Books Online (BOL), SQL Server 2008 supports a set of methods for the geography spatial data type. The geography type is predefined and available in each database. You can create table columns of type geography and operate on geography data in the same manner as you would use other system-supplied types.

     

    However, for merge replication, a Subscriber to a merge publication can be any version no later than the Publisher version.

     

    To work around this issue, we recommend that you install SQL Server 2008 Service Pack 1(SP1) at publisher, and then restart the merge replication agent.

     

    For more information, please visit the following link:

    SQL Server 2008 Service Pack 1: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19

     

    If you have any more questions, please feel free to let me know.

     

    Thanks,

    Yoyo Yu

    • Marked as answer by YoYo Yu Monday, September 27, 2010 1:19 AM
    Wednesday, September 22, 2010 2:46 AM

All replies

  • Hi Petr,

     

    According to Books Online (BOL), SQL Server 2008 supports a set of methods for the geography spatial data type. The geography type is predefined and available in each database. You can create table columns of type geography and operate on geography data in the same manner as you would use other system-supplied types.

     

    However, for merge replication, a Subscriber to a merge publication can be any version no later than the Publisher version.

     

    To work around this issue, we recommend that you install SQL Server 2008 Service Pack 1(SP1) at publisher, and then restart the merge replication agent.

     

    For more information, please visit the following link:

    SQL Server 2008 Service Pack 1: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=66ab3dbb-bf3e-4f46-9559-ccc6a4f9dc19

     

    If you have any more questions, please feel free to let me know.

     

    Thanks,

    Yoyo Yu

    • Marked as answer by YoYo Yu Monday, September 27, 2010 1:19 AM
    Wednesday, September 22, 2010 2:46 AM
  • I am also getting "The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber." error.  I have validated the compatability settings of the database and publication are both 100RTM.  The publisher and subscriber are both 10.0.4000, so they both have SQL Server 2008 Service Pack 1.  Is merge replication of a geography article supported? 
    Saturday, February 12, 2011 3:31 AM
  • W-Man, did you ever receive an answer to your problem? I am in similar need of a solution for replicating geometry data types using Merge replication where both have a 100RTM compatibility setting.

    Thanks.

    Monday, December 12, 2011 4:12 PM