Friday, February 17, 2012

dbcc checkdb error in SQL Server 2005

I am getting the following error while running dbcc checkdb upon a database
on SQL Server 2005. This database is restored from its backup at SQL Server
2000:
__________________________________________________ ___
Msg 8992, Level 16, State 1, Line 1
Check Catalog Msg 3853, State 1: Attribute
(referenced_major_id=302624121,referenced_minor_id =6) of row
(class=0,object_id=277628082,column_id=0,reference d_major_id=302624121,referenced_minor_id=6)
in sys.sql_dependencies does not have a matching row
(object_id=302624121,column_id=6) in sys.columns.
__________________________________________________ _____
The message is continued for all columns. Please help me find the way to
eliminate this error and the reason for this problem.
Please note that I am getting the error even when the db is made single user
mode.
Thanks in advance.
Hi
Have you tried a running DBCC checkdb in a SQL Server 2000 environment?
John
"Nirupam" wrote:

> I am getting the following error while running dbcc checkdb upon a database
> on SQL Server 2005. This database is restored from its backup at SQL Server
> 2000:
> __________________________________________________ ___
> Msg 8992, Level 16, State 1, Line 1
> Check Catalog Msg 3853, State 1: Attribute
> (referenced_major_id=302624121,referenced_minor_id =6) of row
> (class=0,object_id=277628082,column_id=0,reference d_major_id=302624121,referenced_minor_id=6)
> in sys.sql_dependencies does not have a matching row
> (object_id=302624121,column_id=6) in sys.columns.
> __________________________________________________ _____
> The message is continued for all columns. Please help me find the way to
> eliminate this error and the reason for this problem.
> Please note that I am getting the error even when the db is made single user
> mode.
> Thanks in advance.
|||On 2000, it runs without any errors.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Have you tried a running DBCC checkdb in a SQL Server 2000 environment?
> John
> "Nirupam" wrote:
|||TO me, the messages say that there are two versions of the database. An
'Original' one that set up your dependcies (foreign keys, sp calls, etc),
another that is the result of the restore. There is something (a column?) in
the current/new database that is not in the old one.
An old (for me) question, how does one rebuild/verify dependencies in SS? A
new diagram?
Joseph R.P. Maloney, CSP,CCP,CDP
"Nirupam" wrote:
[vbcol=seagreen]
> On 2000, it runs without any errors.
>
> "John Bell" wrote:
|||A few things to note: The errors you're seeing are the result of DBCC
CHECKCATALOG. In SQL Server 2005, we run DBCC CHECKCATALOG by default
during DBCC CHECKDB. There have been many enhancements to the functionality
of CHECKCATALOG in SS2k5, and the addition of new system tables, each of
which could be respnsible for the "new" errors you're seeing after upgrade.
The errors are indicating that there is a row in sys.sql_dependencies that
has a reference to a non-existent row in sys.columns. This error cannot be
automatically repaired by DBCC (no CHECKCATALOG error can), so you should
drop and recreate the referencing object ID (277628082).
Ryan Stonecipher
Microsoft SQL Server Storage Engine, DBCC
This posting is provided "AS IS" with no warranties, and confers no rights.
"jrpm" <jrpm@.discussions.microsoft.com> wrote in message
news:1D3B21FA-0AB3-4172-A12B-18DF685BB91A@.microsoft.com...[vbcol=seagreen]
> TO me, the messages say that there are two versions of the database. An
> 'Original' one that set up your dependcies (foreign keys, sp calls, etc),
> another that is the result of the restore. There is something (a column?)
> in
> the current/new database that is not in the old one.
> An old (for me) question, how does one rebuild/verify dependencies in SS?
> A
> new diagram?
> --
> Joseph R.P. Maloney, CSP,CCP,CDP
>
> "Nirupam" wrote:
|||Hi
If you ran DBCC CHECKCATALOG you should get similar errormessage implying
that your system catalogs are inconsistent.
You may want to check the event log and run utilities on your HDDs to see if
there is any possible corruption.
If you can not restore a working backup or upgrade again from SQL 2000, then
you will have to run the repair option.
John
"Nirupam" wrote:
[vbcol=seagreen]
> On 2000, it runs without any errors.
>
> "John Bell" wrote:
|||Hi
In view of Ryan's reply it seems that running the repair option is not the
solution. You may still want to check out the hardware just in case.
John
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> If you ran DBCC CHECKCATALOG you should get similar errormessage implying
> that your system catalogs are inconsistent.
> You may want to check the event log and run utilities on your HDDs to see if
> there is any possible corruption.
> If you can not restore a working backup or upgrade again from SQL 2000, then
> you will have to run the repair option.
> John
> "Nirupam" wrote:
|||Thanks very much to all of you for the inputs.
As Ryan pointed, CHECKCATALOG in 2005 seems to be further checking
dependencies unlike in 2000. I found that all the errors were raised from
some old SPs!
Upon recompiling, some of them threw errors, so the DBCC errors were
appropriate BUT what I couldnt figure out is that some SPs did recompile
alright.
Is SQL2K5 checking something about the last compilation dates while throwing
these errors?
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> In view of Ryan's reply it seems that running the repair option is not the
> solution. You may still want to check out the hardware just in case.
> John
> "John Bell" wrote:
|||Hi
If you are upgrading versions it is always worth re-compiling
procedures/functions/views to check compatibility.
John
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> If you ran DBCC CHECKCATALOG you should get similar errormessage implying
> that your system catalogs are inconsistent.
> You may want to check the event log and run utilities on your HDDs to see if
> there is any possible corruption.
> If you can not restore a working backup or upgrade again from SQL 2000, then
> you will have to run the repair option.
> John
> "Nirupam" wrote:

No comments:

Post a Comment