FIX: Merge Snapshot Agent May Fail With Syntax Error Message When Published Table Contains Computed Columns (280846)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q280846
BUG #: 351196 (SHILOH)

SYMPTOMS

The Merge Snapshot Agent may fail with a syntax error message similar to the following
Line ##: Incorrect syntax near '-'. The step failed.
When the following conditions occur:
  • The published table contains computed columns and/or a timestamp column.
  • The published table contains more than 16 total columns.
  • The number of computed columns plus the timestamp column is greater than or equal to the remainder computed by dividing the number of total columns by 8.

RESOLUTION

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next SQL Server 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:
   Version    File name
   -------------------------
   8.00.271   s80271i.exe
				

WORKAROUND

Add columns with NULL defaults to the published table so that the remainder computed by dividing the number of total columns by 8 is greater than the number of computed columns plus the timestamp column.

STATUS

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

MORE INFORMATION

The following table causes the problem to occur:
create table t1
(
	col1 int,
	col2 int,
	col3 int,
	col4 int,
	col5 int,
	col6 int,
	col7 int,
	col8 int,
	col9 int,
	col10 int,
	col11 int,
	col12 int,
	col13 as (col1 + col2),
	col14 as (col1 + col2),
	col15 as (col1 + col2),
	col16 as (col1 + col2),
	col17 int,
	col18 int,
	col19 int,
	col20 uniqueidentifier rowguidcol not null
)
go
				
Note the following:
  • The table contains four computed columns.
  • The table contains 20 total columns.
  • The number of computed columns plus the timestamp column (4 + 0 = 4) is equal to the remainder computed by dividing the number of total columns by 8 (20/8 = 2, remainder 4).

Modification Type:MinorLast Reviewed:10/7/2005
Keywords:kbBug kbfix kbSQLServ2000sp1fix KB280846