BUG: sp_repladdcolumn Returns Error 21286 When Executed on a Merge Publication That Contains an Embedded Period (307956)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q307956
BUG #: 354012 (SHILOH_BUGS)

SYMPTOMS

If you add a column to an article in a Merge publication whose name contains an embedded period ('.') by using the SQL Enterprise Manager or the sp_repladdcolumn stored procedure, the procedure fails with an error message similar to:
Server: Msg 21286, Level 16, State 1, Procedure sp_repladdcolumn, Line 444 Conflict table 'conflict_<publication name with a .>_<articlename>' does not exist.
This problem does not occur with transactional and snapshot publications.

CAUSE

If you use the sp_repladdcolumn stored procedure to add a column to an article that is part of a publication, the procedure is not correctly parsing the publication name that contains the embedded period, which then causes the error.

WORKAROUND

To work around this problem, make sure that the Merge publication name does not contain an embedded period.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 2000.

MORE INFORMATION

Merge replication uses conflict tables to record conflicting changes performed to the same data at different replicas. SQL Server creates these conflict tables for every article defined in a merge publication. The name of a conflict table is in the form of:

conflict_<publication name>_<article name>

Assume that the merge publication's name is publication.name (note the embedded period) and that the article's name is articlename. If you use the the sp_repladdcolumn stored procedure to add a column to the publication, then the procedure tries to reference the table name as conflict_publication.name_articlename instead of referencing the conflict table as [conflict_publication.name_articlename]. The error occurs because of the incorrect reference to the conflict table.


Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbbug kbpending KB307956