FIX: Merge Agent Fails with Error: "Line38: Incorrect syntax near "." " During Initial Snapshot Application (303981)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q303981
BUG #: 354883 (SHILOH_BUGS)

SYMPTOMS

The Snapshot Agent may report the following error when generating the initial snapshot for a merge publication:
Line38: Incorrect Syntax near "."
The error message occurs when the snapshot process is creating a stored procedure, which is used internally by merge replication, for one of the tables that is being published.

CAUSE

The problem is specific to tables published for merge replication. If the tables that are being published have a lot of columns with long column names, the creation of a required stored procedure fails.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

WORKAROUND

To work around this problem you can either:
  • Use short column names for the tables that have a lot of columns with long names for the columns.

    -or-

  • Manually synchronize the Subscriber with the Publisher by using a Backup or Restore command, or by Data Transformation Services (DTS) to avoid generating the snapshot.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.

MORE INFORMATION

If your publication has multiple articles, identify the tables with long column names and remove them from the publication, which allows the publication of the remaining tables.

The problem does not occur with tables published for Transactional Replication.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbBug kbfix KB303981