FIX: Update Query Returns Error 1903 if Temporary Composite Index Over 900 Bytes

Article translations Article translations
Article ID: 280744 - View products that this article applies to.
This article was previously published under Q280744
BUG #: 58285 (SQLBUG_70)
BUG #: 236191 (SHILOH_bugs)
Expand all | Collapse all

On This Page

SYMPTOMS

When you perform an update query, the query optimizer may incorrectly create a temporary composite index greater than the maximum size of 900 bytes. When this occurs on SQL Server 7.0, you receive the following error message:
Error : Server: Msg 1903, Level 16, State 2, Line 2
900 is the maximum allowable size of an index. The composite index specified is 1028 bytes.
On SQL Server 2000, if the actual data in the temporary index exceeds 900 bytes, you receive the following error message:
Server: Msg 1946, Level 16, State 3, Line 2
Operation failed. The index entry of length 1012 bytes for the index 'IndexName' exceeds the maximum length of 900 bytes.
Warning! The maximum key length is 900 bytes. The index 'IndexName' has maximum length of 1028 bytes. For some combination of large values, the insert/update operation will fail.
Note that in SQL Server 2000, if the actual data in the temporary index is less than 900 bytes, no error is returned and the update completes successfully.

RESOLUTION

SQL Server 2000

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

SQL Server 7.0

To resolve this problem, obtain the latest service pack for SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack

WORKAROUND

Define an appropriate index on the table that the query optimizer can use so that it does not create a temporary index. You may use the Index Tuning Wizard to get a recommendation on indexes for the query in question.

For more information, see the "Index Tuning Wizard" topic in SQL Server Books Online.

STATUS

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

SQL Server 2000

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

SQL Server 7.0

This problem was first corrected in SQL Server 7.0 Service Pack 3.

Properties

Article ID: 280744 - Last Review: October 31, 2003 - Revision: 3.2
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbbug kbfix kbsqlserv2000sp1fix KB280744

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com