If you are getting the following error
Data row does not have a matching index row in the index 'nc1'
Unable to find index entry in index ID 1, of table 149575571, in database 'msdb'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.
One possible solution is to restore from a backup or to create the index again using the following script
CREATE NONCLUSTERED INDEX [nc1] ON [dbo].[sysjobhistory]
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP
Technorati Tags: SQL Server
LiveJournal Tags: SQL Server
del.icio.us Tags: SQL ServerEduardo Castro.