Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 Errors found and not repaired

Author  Topic 

Corobori
Posting Yak Master

105 Posts

Posted - 2005-09-26 : 20:54:01
Hi,

We run the DBCC on a db and we're having issues that can't seem to be fixed:

Plenty of


Cannot insert duplicate key row in object 'sysobjects' with unique
index 'ncsysobjects'.
Msg 2601, Level 14, State 3, Server MYLOCALHOST\MYINSTANCE, Line 2


And some


Msg 8951, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Table error: Table 'sysobjects' (ID 1). Missing or invalid key in
index 'ncsysobjects' (ID 2) for the row:
Msg 8955, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Data row (1:245:32) identified by (RID = (1:245:32) id = 375724441)
has index values (name = 'vwRacinesHonGestionEchelle' and uid = 1 and
id = 375724441).
DBCC results for 'Trillium'.
DBCC results for 'sysobjects'.
Could not repair this error.
Could not repair this error.
Could not repair this error.
Msg 8951, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Table error: Table 'sysobjects' (ID 1). Missing or invalid key in
index 'ncsysobjects' (ID 2) for the row:
Msg 8955, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Data row (1:245:38) identified by (RID = (1:245:38) id = 391724498)
has index values (name = 'vwHonorairesGestion' and uid = 1 and id =
391724498).


Any clue of what I should do ?


jean-luc
www.corobori.com

ryanston
Microsoft SQL Server Product Team

89 Posts

Posted - 2005-09-27 : 13:48:43
quote:
Originally posted by Corobori

Hi,

We run the DBCC on a db and we're having issues that can't seem to be fixed:

Plenty of


Cannot insert duplicate key row in object 'sysobjects' with unique
index 'ncsysobjects'.
Msg 2601, Level 14, State 3, Server MYLOCALHOST\MYINSTANCE, Line 2


And some


Msg 8951, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Table error: Table 'sysobjects' (ID 1). Missing or invalid key in
index 'ncsysobjects' (ID 2) for the row:
Msg 8955, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Data row (1:245:32) identified by (RID = (1:245:32) id = 375724441)
has index values (name = 'vwRacinesHonGestionEchelle' and uid = 1 and
id = 375724441).
DBCC results for 'Trillium'.
DBCC results for 'sysobjects'.
Could not repair this error.
Could not repair this error.
Could not repair this error.
Msg 8951, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Table error: Table 'sysobjects' (ID 1). Missing or invalid key in
index 'ncsysobjects' (ID 2) for the row:
Msg 8955, Level 16, State 1, Server MYLOCALHOST\MYINSTANCE, Line 2
Data row (1:245:38) identified by (RID = (1:245:38) id = 391724498)
has index values (name = 'vwHonorairesGestion' and uid = 1 and id =
391724498).


Any clue of what I should do ?


jean-luc
www.corobori.com



You have nonclustered index corruption on sysobjects, which is not repairable by DBCC. However, since we don't have to touch the clustered index of the system table, you can run an undocumented stored procedure (that's documented all over the web ) to rebuild the NC index on sysobjects after backing up your database. Give this a shot:


USE trillium
go

ALTER DATABASE trillium SET SINGLE_USER
go

EXEC sp_fixindex 'trillium', 'sysobjects', 2
go

DBCC CHECKDB ('trillium') WITH NO_INFOMSGS, ALL_ERRORMSGS
go

ALTER DATABASE trillium SET MULTI_USER



You may have other corruption problems in the database after running this -- if sysobjects is corrupt, then DBCC won't go any further.

Let me know how it goes.

Thanks,

----------------------
Ryan Stonecipher
Developer, Microsoft SQL Server Storage Engine, DBCC
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page
   

- Advertisement -