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
 DBCC PAGE Results

Author  Topic 

oleg308
Starting Member

8 Posts

Posted - 2005-10-04 : 13:07:34
Hello Ryan.

I run DBCC PAGE (dbname, 1, 136, 3) with trace 3604 on:

Server: Msg 8968, Level 16, State 1, Line 1
Table error: DBCC PAGE page (1:136) (object ID 0, index ID 0) is out of the range of this database.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

nr
SQLTeam MVY

12543 Posts

Posted - 2005-10-05 : 04:26:22
It's saying that the entry doesn't exist for that database.
Have a look at
http://www.mindsdoor.net/SQLAdmin/PageStructure.html


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-10-05 : 12:49:52
quote:
Originally posted by nr

It's saying that the entry doesn't exist for that database.
Have a look at
http://www.mindsdoor.net/SQLAdmin/PageStructure.html



That link doesn't seem very helpful - no explanation of how the decoding was done and also contains some errors (e.g. PageSize = 8Mb). Why not show the output from option 3, which at least breaks the records out individually?

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-10-05 : 12:55:03
quote:
Originally posted by oleg308

Hello Ryan.

I run DBCC PAGE (dbname, 1, 136, 3) with trace 3604 on:

Server: Msg 8968, Level 16, State 1, Line 1
Table error: DBCC PAGE page (1:136) (object ID 0, index ID 0) is out of the range of this database.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.



Is this on the same database as you're getting the CHECKTABLE failure on sysobjects?

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

oleg308
Starting Member

8 Posts

Posted - 2005-10-11 : 13:12:35
Yes Paul, that's the one.
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-10-11 : 13:45:26
quote:
Originally posted by oleg308

Yes Paul, that's the one.



Can you run CHECKTABLE again and see if it still complains? It can't complain about a page that doesn't exist. Something's changed since you last posted CHECKTABLE output.

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

oleg308
Starting Member

8 Posts

Posted - 2005-10-12 : 16:51:04
Sorry Paul, the previous output was from the wrong version.
Here is the correct one:

DBCC CHECKTABLE (sysobjects) WITH NO_INFOMSGS, ALL_ERRORMSGS

Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID -1, index ID 65535, page ID (1:136). The PageId in the page header = (65535:-1).
Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:136) with latch type SH. sysobjects failed.


This is a CHECKDB output:

Server: Msg 8966, Level 16, State 1, Line 1
Could not read and latch page (1:136) with latch type SH. sysobjects failed.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-10-13 : 12:40:10
Looks like a h/w problem - your page header has been overwritten with 0xFF (i.e. all 'ones').

ok - try DBCC PAGE (dbname, 1, 136, 1) - it should work.

Do you have an up-to-date backup? This error is not repairable so you're going to have to restore to new media or export/import as much data as you can from the corrupt database.

Thanks

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

oleg308
Starting Member

8 Posts

Posted - 2005-10-14 : 13:55:36
Hi Paul.
That's the output of DBCC PAGE (dbname, 1, 136, 1) :


PAGE: (65535:-1)
----------------

BUFFER:
-------

BUF @0x00FF91C0
---------------
bpage = 0x1A22E000 bhash = 0x00000000 bpageno = (1:136)
bdbid = 9 breferences = 1 bstat = 0x809
bspin = 0 bnext = 0x00000000

PAGE HEADER:
------------

Page @0x1A22E000
----------------
m_pageId = (65535:-1) m_headerVersion = 255 m_type = 255
m_typeFlagBits = 0xff m_level = 255 m_flagBits = 0xffff
m_objId = -1 m_indexId = 65535 m_prevPage = (65535:-1)
m_nextPage = (65535:-1) pminlen = 65535 m_slotCnt = 65535
m_freeCnt = 65535 m_freeData = 65535 m_reservedCnt = 65535
m_lsn = (-1:-1:65535) m_xactReserved = 65535 m_xdesId = (65535:-1)
m_ghostRecCnt = 65535 m_tornBits = -1

Allocation Status
-----------------
GAM (1:2) = ALLOCATED SGAM (1:3) = NOT ALLOCATED
PFS (1:1) = 0x60 MIXED_EXT ALLOCATED 0_PCT_FULL DIFF (1:6) = NOT CHANGED
ML (1:7) = NOT MIN_LOGGED

DATA:
-----

Slot 0, Offset 0x160
--------------------

Row at offset 352 may be corrupt.
Hex dump of remaining -123230 bytes:
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2005-10-14 : 14:47:42
Thanks. Its as I thought - the page had been overwritten by your hardware. You'll need to restore from a backup or extract out as much data as you can from tables that are accessible. PSS can help you with this if you want, but the call will cost you $249 (as its not a SQL bug).

Did you already check for evidence of h/w problems in the Windows event log or SQL errorlog?

Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
Go to Top of Page

oleg308
Starting Member

8 Posts

Posted - 2005-10-17 : 13:23:21
Hi Paul.

Thanks for your help.
Yes, it was a hardware problem - the HD failure to be exact.
I extracted most of the data from it.

Best regards,
Oleg.
Go to Top of Page
   

- Advertisement -