What is object zero in a database

  • I am seeing the following error

    Error string: Attempt to fetch logical page (1:26008394) in database 'BIGDATAWAREHOUSE' belongs to object '0', not to object 'stg_DataImport'.

    The table has a clustered index on it but no primary key as it is just a staging table.

    I should be grateful for any suggestions (apart from PANIC).

  • Not seen this one before!  Looking at a few threads on this, it seems pretty nasty though.

    Have you ran a DBCC CHECKTABLE/DBCC CHECKDB?

    As it's a staging table, have you tried renaming the current table and recreating the current table?

  • Yes indeed and as its on a 1TB I was relieved when it reported no errors.

    The suspicion is that as the staging table is TRUNCATEd the pointers in the index get out of sync.

  • Possible.

    Have you rebuild the indexes?

  • I ran into a problem which reported a similar error in the past.  In my situation I was transfering databases between servers (production and development), when I would attempt to run a query that had been saved in the proccache it would give me the error message about database ID 0.  After banging my head up against a wall a few hundred times I posted a question about the issue on the Microsoft forums and one of the guys there informed me that it's a known issue.

    My solution from there was obvious, execute DBCC FREEPROCCACHE prior to attempting to execute any SQL after restoring the database.  Worked like a charm.

    But that may not be your solution as there are only similarities between our situations.

  • There is no object 0. If a page is allocated to object 0, it means that it is an unowned (empty) page. It sounds like there may be some chain linkage or IAM errors, ie something is saying that the page belongs to the table, but the page header says it doesn't, or vis versa

    You can run the following, see what objectID is listed in the page header. Note, undocumented features in use here.

    DBCC TRACEON (3604) -- redirect output to client

    DBCC PAGE(<enter dbid here>,1,26008394) -- print out page header.

    DBCC TRACEOFF (3604)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I think there is a corruption, caused by the Stale Read or Lost Write activity. 

    Try running dbcc checkdb and also check the hardware, firmware for the root cause of the corruption. You can download use SQLIOStress which will inform about the lost write or stale read.

    231619 (http://support.microsoft.com/kb/231619/) HOW TO: Use the SQLIOStress Utility to Stress a Disk Subsystem Such as SQL Server

    Minaz

    "More Green More Oxygen !! Plant a tree today"

  • I was also encountered with the same error. However, in my case, DBCC CHECKDB reported allocation errors. However, this might have been the result of broken linkage chain between objects.

    Pankaj Khanna
    Database Administrator - SQL Server 2000

    Keep hope to keep you intact...

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply