Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199398) >

Error converting data type varchar to geometry. (Source: MSSQLServer, Error number: 8114) Get help: http://help/8114

share|improve this question
    
I can has context? –  EEAA Sep 14 '10 at 1:23

3 Answers 3

I'm not sure if it's a bug but the only way that I can get geometry data to successfully replicate is to use the following settings on the publisher (Article Properties, set properties for All tables) -:

Convert filestream to MAX data types - True

Strangely, "Convert Spatial to MAX data types" doesn't fix the problem. It's also necessary to select "Copy spatial indexes - True" for spatial index support. Other than that, the defaults should be fine.

share|improve this answer

To produce above error, Follow the below steps:

--STEP 1 : Create a database on sql server 2008 r2 enterprise or developer edition create database replicationtest; go

IF OBJECT_ID ( 'dbo.SpatialTable', 'U' ) IS NOT NULL DROP TABLE dbo.SpatialTable; GO

--STEP 2: create a table storing geometry data type CREATE TABLE SpatialTable ( id int IDENTITY (1,1), GeomCol1 geometry, GeomCol2 AS GeomCol1.STAsText() ); GO

--STEP 3: insert some sample records INSERT INTO SpatialTable (GeomCol1) VALUES (geometry::STGeomFromText('LINESTRING (100 100, 20 180, 180 180)', 0));

--STEP 4: --configure distributor on this enterprise edition --Create a publication on above database

--STEP 5: Create a subscriber on SQL Server 2008 r2 express edition(using push subscription)

--STEP 6: Now once snapshot is applied then both databases are synchronized

--STEP 7: Insert a row into above table on publisher INSERT INTO SpatialTable (GeomCol1) VALUES (geometry::STGeomFromText('POLYGON ((0 0, 150 0, 150 150, 0 150, 0 0))', 0)); GO

--STEP 6: Launch replication monitor and observe the error:

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. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199398) >

Error converting data type varchar to geometry. (Source: MSSQLServer, Error number: 8114) Get help: http://help/8114
share|improve this answer

Set SQL Server 2008 compatibility settings to SQL Server 2008.

It might be set to SQL Server 2005 compatibility, which doesn't support Geometry column.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.