BUG: ALTER COLUMN on Column With Auto-Stats Returns Error Message 1903 (290992)
The information in this article applies to:
This article was previously published under Q290992
BUG #: 101257 (SQLBUG_70)
SYMPTOMS
The following statement:
ALTER TABLE <table_name> ALTER COLUMN <column_name> <new_data_type>
may fail with a 1903 error message when the AUTO_CREATE_STATISTICS database option is set ON:
Msg 1903, Level 16, State 1, Line 1
900 is the maximum allowable size of an index. The composite index specified is xxxx bytes.
CAUSE
A statistics _wa_sys_<column_name>_<xxxx> is automatically created on this column, which is not dropped automatically when the ALTER COLUMN statement executes.
This behavior does not follow this SQL Server 7.0 Books Online statement:
"Statistics automatically generated by the query optimizer are automatically dropped by ALTER COLUMN."
NOTE: The naming convention for statistics created automatically is:
_wa_sys_<column_name>_<xxxx>
<xxxx> is usually the object_id of table in hexadecimal form.
WORKAROUND
Drop the statistics of the column explicitly before you execute the code. For example:
ALTER TABLE <table_name> ALTER COLUMN
drop statistics <table_name>._wa_sys_<column_name>_<xxxx>
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbDSupport KB290992 |
---|
|