The information in this article applies to:
SUMMARYThis article discusses how to use the undocumented system stored procedure sp_fixindex to correct problems in the indexes of SQL Server system tables. MORE INFORMATION
NAME: sp_fixindex FunctionIt is not possible to drop the indexes of the system tables for SQL Server using the normal DROP INDEX command. The undocumented command sp_fixindex can be used to drop and recreate and index on a system table, allowing sites which encounter allocation or data errors in these indexes to address the problem.sp_fixindex uses the undocumented dbcc repairindex command. The site should always make a backup of their database before running sp_fixindex. Syntax
Where:dbname is the name of the database with the problem index. tablename is the name of the table with the problem index. indid is the index id of the problem index. How To UseIf you do not already know the indid of the affected index, find it by viewing the output of the following select:
The database must be in single user mode, and sp_fixindex must be executed
within the database. If multiple indexes have problems, sp_fixindex must be
run individually for each problem index.Always verify that the problems have been fully corrected without creating data integrity problems by running dbcc checkdb and checkalloc after sp_fixindex completes. If checkdb and checkalloc will take too long, a quick check can be made by running a dbcc checktable, but checkdb and checkalloc should still be run when time allows. sp_fixindex can be used to correct errors like 605's in the index pages of a system table. If the errors are in the data pages of the system table, the user can only restore from their last backups. If sp_fixindex has been run on master's system catalog, restart the service before running dbccs. ExampleIn this example sp_fixindex is used to correct the clustered index in the sysprocedures table for a database named cheers.
Additional query words: Windows NT
Keywords : kbusage kbSQLServ600 kbSQLServ650 kbSQLServ700 kbSQLServ650sp5 kbSQLServ700sp1 SSrvWinNT |
Last Reviewed: January 19, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |