PRB: Error 2757 If Table Has More Than 254 Columns in a Publication (310631)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q310631

SYMPTOMS

If a table has more than 254 columns, you cannot add the table as an article to a snapshot or a transactional publication. In addition, if a table has more than 254 columns, when you try to use vertical filters to limit the number of columns to 254, you still cannot add the table as an article.

When you try to add the table as an article to a snapshot or a transactional publication, you receive the following error message:
Error 2757: RAISERROR failed due to invalid parameter substitution(s) for error 20068, severity 16, state 1.
The "Defining an Article" topic in the SQL Server 7.0 Books Online documentation states:

"Important A table used in a snapshot or transactional publication can have a maximum of 255 columns and a maximum row size of 8,000 bytes. A table used in a merge publication can have a maximum of 246 columns and a maximum row size of 6,000 bytes."

CAUSE

This problem occurs because a table that is used in a snapshot or a transactional publication can have a maximum of 254 columns.

RESOLUTION

This behavior is by design. The SQL Server 7.0 Books Online topic incorrectly states that the maximum number of columns is 255 for snapshot and transactional articles.

STATUS

Microsoft has confirmed that this is a problem in SQL Server 7.0.

MORE INFORMATION

The column limit is 255 for snapshot and transactional articles in Microsoft SQL Server 2000. If you exceed this limit in SQL Server 2000, you receive the following error message:
Error 20068: The article cannot be created on table '[dbo].[table_name]' because it has more than 255 columns.
The "Publishing Data and Database Objects" topic in the SQL Server 2000 Books Online documentation correctly reflects this limitation:

"A table used in a snapshot or transactional publication can have a maximum of 255 columns and a maximum row size of 8,000 bytes. A table used in a merge publication can have a maximum of 246 columns and a maximum row size of 6,000 bytes."


Modification Type:MajorLast Reviewed:6/27/2002
Keywords:kbprb KB310631