Microsoft KB Archive/304346

= PRB: Schema Definition of Base Table at Subscriber Does Not Match Table in Publisher Database =

Article ID: 304346

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q304346



SYMPTOMS
The Merge Agent may experience this error message

The schema definition of base table 'table name' 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.

when all of the following conditions are true in SQL Server 2000 Merge Replication:
 * You have a vertical filtered article in the publication.
 * You specify that the subscriber already has data and schema when you add the subscription.
 * You manually create the subscriber table on the subscriber, and the table has extra columns that are not included in the vertical filtered merge replication article.



CAUSE
Vertical filtered merge replication is not designed for the replication of filtered data to a subscribing table that has more columns than those defined in the published article.

Merge replication uses replication stored procedures instead of the individual INSERT, UPDATE, and DELETE statements to update data and insert new records in the subscription database. During the initial synchronization, the Merge Agent creates the replication stored procedures in the subscriber database for each subscriber table in the format of sp_ins_guid, sp_upd_guid, sp_del_guid, where guid is the identifier for each article. For replication to be successful, the stored procedures in the subscriber database must be the same as the stored procedures in the publishing database.

If you use a vertical filter in the published article, the replication stored procedures in the published database only use the columns that pass the filter requirement as parameters. If you tell the Replication wizard that the subscriber already has the data and schema from the publisher, the Replication wizard creates the replication stored procedures by using all the columns in the existing subscribing table as parameters.



WORKAROUND
To work around this problem you can either:
 * Manually create the subscribing tables and make sure that they have the same schema as the published merge articles.

-or-


 * Have the Replication wizard create the subscribing tables.

Keywords: kbprb KB304346

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.