The information in this article applies to:
SYMPTOMS
An attempt to update sysindexes using a query such as the following,
results in the following message from SQL Server:
However, the following query only returns one row:
CAUSEBecause the sysindexes table contains one row for each clustered index, each nonclustered index, and each table without a clustered index, it is possible for the table to have more than one entry that corresponds to one data object. To protect against inadvertently modifying duplicate values in sysindexes, SQL Server requires that your UPDATE statement include the columns that compose the primary key for the sysindexes table. These columns are ID and INDID. WORKAROUND
To perform an update of the dpages value of a table named "my_table", you
must first find the values of ID and INDID for your table by using the
following query:
INDID will contain the following:
Using the values returned from the query above, you can now use a query of the following form to update the sysindexes table:
There are several more things to note concerning the updating of the sysindexes table. Before you can update any system table, the system administrator (SA) must enable updates to system catalogs. This can be done by using the sp_configure stored procedure with the RECONFIGURE WITH OVERRIDE option, or by using the dynamic options under the Configuration menu of SAF. After sysindexes has been modified, be sure to execute the CHECKPOINT statement in your database. Additional query words: prodsql
Keywords : kbprg SSrvServer |
Last Reviewed: March 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |