The information in this article applies to:
BUG #: 55811 (SQLBUG_70) 97 (MDAC_QFE) SYMPTOMS
After dropping a column from a table through ALTER TABLE, attempts to obtain statistics about an index through sp_statistics may return incorrect results. This procedure is used by the Microsoft ODBC driver when an application calls SQLStatistics, and through the Microsoft OLE DB provider for certain queries using IDBSchemaRowset.
After the drop column, the results from sp_statistics fails to indicate that c2 is a part of index idx_test, as well as failing to indicate that c3 is part of index idx_test2. This is because c2 and c3 are both the first column of their respective index, which matches the column ordinal of column c1 that was originally part of the table.If you run sp_help for the test table, it shows the correct column information for all of the indices. RESOLUTIONA supported fix that corrects this problem is now available from Microsoft, but
it has not been fully regression tested and should be applied only to systems
experiencing this specific problem. If you are not severely affected by this
specific problem, Microsoft recommends that you wait for the next SQL Server service pack
that contains this fix. http://www.microsoft.com/support/supportnet/overview/overview.aspThe English version of this fix should have the following file attributes or later: NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.NOTE: If this product was already installed on your computer when you purchased it from the Original Equipment Manufacturer (OEM) and you need this fix, please call the Pay Per Incident number listed on the above Web site. If you contact Microsoft to obtain this fix, and if it is determined that you only require the fix you requested, no fee will be charged. However, if you request additional technical support, and if your no-charge technical support period has expired, or if you are not eligible for standard no-charge technical support, you may be charged a non-refundable fee. For more information about eligibility for no-charge technical support, see the following article in the Microsoft Knowledge Base: Q154871 Determining If You Are Eligible for No-Charge Technical Support WORKAROUND
Remove the column by performing a SELECT INTO of the desired columns into a new table, dropping the original table, and then rename the intermediate table to have the original table name. Indexes will also have to be recreated, as permissions may need to be granted as well. STATUSMicrosoft has confirmed this to be a problem in SQL Server version 7.0. Additional query words: change modify schema
Keywords : SSrvAdmin SSrvGen SSrvProg SSrvStProc SSrvTran_SQL kbbug7.00 kbSQLServ700bug |
Last Reviewed: October 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |