Friday 15 January 2010

Fixing Corrupt index on system table

1> sp_logiosize 'default'
2>
Msg 644, Level 21, State 5:
Procedure 'sp_logiosize', Line 313:
Index row entry for data row id (817, 15) is missing from index page 1009 of index id 2 of table 'sysattributes' in database 'sag'. Xactid is (10215,24). Drop and re-create the index.
1> sp_dboption sag, 'single', true
2>
Database option 'single user' turned ON for database 'sag'.
Running CHECKPOINT on database 'sag' for option 'single user' to take effect.
(return status = 0)
1>
1> use sag
2>
1> checkpoint
1> use sag
2>
1> sp_fixindex sag,sysattributes,2
2>
There are 22.000000 rows in 1 pages for object 'sysattributes'.
Non-clustered index successfully restored for object 'sysattributes' in 'sag' database.
DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role.
(return status = 0)

1> sp_logiosize 'default'
2>
The transaction log for database 'sag' will use I/O size of 4 Kbytes.
(return status = 0)
1>

No comments:

Post a Comment