Microsoft KB Archive/308804

= FIX: Distribution Agent Fails with &quot;Invalid Distribution Command&quot; Error Message =

Article ID: 308804

Article Last Modified on 10/16/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q308804



BUG #: 355103 (SHILOH_BUGS)



SYMPTOMS
When you add a new column to an existing article, if you press ENTER after the column definition before you click OK, the next time the Distribution Agent runs, it fails with this error message:

Invalid Distribution Command

The last command in the Distribution Agent is: if not exists (select * from syscolumns where name=N'sam2' and id = object_id('[authors]')) begin if exists (select * from sysobjects where name=N'syspublications') if exists (select * from sysarticles where objid=object_id('[authors]')) exec sp_repladdcolumn @source_object=N'[authors]',@column=N'newcol1',@typetext=N'char(10) DEFAULT ' else alter table [authors] add [newcol1] char(10) DEFAULT '' else alter table [authors] add [newcol1] char(10) DEFAULT '' end

The transaction sequence number and command ID of the last execution batch are 0x000000060000013D004E00000000 and 1.



CAUSE
The Distribution Agent does not handle white space characters (that is, a tab, a new line, or a carriage-return) as a valid part of a command.



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



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.



Steps to Reproduce Behavior
 Create a transactional publication with the authors table as an article. Create a subscription. Start the Snapshot Agent.  After you apply the Snapshot Agent, click Publication Properties, point to Filter Columns, and then click Add Column. Add a column named newcol1 to the article with a column definition of: char(10) DEFAULT '' </li> Press ENTER.</li> Click OK. When the Distribution Agent runs, it fails with the error message:

Invalid Distribution Command

</li></ol>

Keywords: kbbug kbfix KB308804

-

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

© Microsoft Corporation. All rights reserved.