|
Home > Archive > microsoft.public.sqlserver.server > November 2002 > bad page
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| twiggy 2002-11-29, 12:23 am |
| Kind of a technical question, but I wondered if anyone had
some expierence fixing/detecting errors in db pages.
I've got a bad page, it's part sysindexes of all places.
Anyways I get a torn page when ever I try to access it.
The results of dbcc page ( 7, 1, 4401 ) are below, minus
the buffer stuff.
I can't see anything obviously wrong with the page, if I
run dbcc page with print option 1, I see the rows and
everything looks cool there. The offset of the torn page
error points right at the beginning of the first record.
I'm wondering something got messed up in the PFS file.
Anyways I'm wondering if anyone out there has hacked this
stuff and can see something wrong. I'm a little worried
about the m_tornbits portion of the header. Can someone
explain what it repersents, can't find any docs on the web.
I'm trying to avoid going to MS on this, I really don't
want to spend the cash, and I have a backup so it isn't
urgent, just thought it would be fun, and may come in
handy if I really do need the data in the future.
thanks,
et
PAGE HEADER:
------------
Page @0x2D014000
----------------
m_pageId = (1:4401) m_headerVersion = 1 m_type
= 1
m_typeFlagBits = 0x0 m_level = 0
m_flagBits = 0x8002
m_objId = 2 m_indexId = 0
m_prevPage = (1:4402)
m_nextPage = (1:1159) pminlen = 82
m_slotCnt = 17
m_freeCnt = 4390 m_freeData = 6888
m_reservedCnt = 0
m_lsn = (125859:21746:2) m_xactReserved = 0
m_xdesId = (0:151539208)
m_ghostRecCnt = 0 m_tornBits = 16778241
Allocation Status
-----------------
GAM (1:2) = ALLOCATED SGAM (1:3) = NOT ALLOCATED
PFS (1:1) = 0x40 ALLOCATED 0_PCT_FULL DIFF
(1:6) = CHANGED
ML (1:7) = NOT MIN_LOGGED
| |
| Jasper Smith 2002-11-29, 9:23 am |
| AFAIK the only way to recover from a torn page is
to restore from backups.
When a 8k page is written physically to disk it is actually
written in 16 512 byte sectors. SQL flips a bit for each
sector as it's written to disk. Thus if any of the bits are
in a wrong state when the page is later read then SQl
can detect the incomplete IO operation. This is what the
m_tornbits portion of the header indicates to the best of
my knowledge :-)
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"twiggy" <etwilegar@ttgonline.com> wrote in message
news:1e18c01c2976e$97e35510$8d
f82ecf@TK2MSFTNGXA02...
> Kind of a technical question, but I wondered if anyone had
> some expierence fixing/detecting errors in db pages.
>
> I've got a bad page, it's part sysindexes of all places.
> Anyways I get a torn page when ever I try to access it.
>
> The results of dbcc page ( 7, 1, 4401 ) are below, minus
> the buffer stuff.
>
> I can't see anything obviously wrong with the page, if I
> run dbcc page with print option 1, I see the rows and
> everything looks cool there. The offset of the torn page
> error points right at the beginning of the first record.
>
> I'm wondering something got messed up in the PFS file.
> Anyways I'm wondering if anyone out there has hacked this
> stuff and can see something wrong. I'm a little worried
> about the m_tornbits portion of the header. Can someone
> explain what it repersents, can't find any docs on the web.
>
> I'm trying to avoid going to MS on this, I really don't
> want to spend the cash, and I have a backup so it isn't
> urgent, just thought it would be fun, and may come in
> handy if I really do need the data in the future.
>
>
> thanks,
> et
>
>
>
> PAGE HEADER:
> ------------
>
> Page @0x2D014000
> ----------------
> m_pageId = (1:4401) m_headerVersion = 1 m_type
> = 1
> m_typeFlagBits = 0x0 m_level = 0
> m_flagBits = 0x8002
> m_objId = 2 m_indexId = 0
> m_prevPage = (1:4402)
> m_nextPage = (1:1159) pminlen = 82
> m_slotCnt = 17
> m_freeCnt = 4390 m_freeData = 6888
> m_reservedCnt = 0
> m_lsn = (125859:21746:2) m_xactReserved = 0
> m_xdesId = (0:151539208)
> m_ghostRecCnt = 0 m_tornBits = 16778241
>
> Allocation Status
> -----------------
> GAM (1:2) = ALLOCATED SGAM (1:3) = NOT ALLOCATED
> PFS (1:1) = 0x40 ALLOCATED 0_PCT_FULL DIFF
> (1:6) = CHANGED
> ML (1:7) = NOT MIN_LOGGED
>
>
>
>
|
|
|
|
|