Unix Technical Forum

How to get a particular row from dbcc page.

This is a discussion on How to get a particular row from dbcc page. within the Sybase forums, part of the Database Server Software category; --> Hi there, How can I view a particular row from dbcc page? Below is the full dbcc page output. ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 06:08 PM
Miguel García Fillion
 
Posts: n/a
Default How to get a particular row from dbcc page.

Hi there,

How can I view a particular row from dbcc page?

Below is the full dbcc page output. I was told that the row on this page is
#19 (from nextrno which is 20).

Now, how can I select this row #19 from the table? (I already know the table
name from the object id).

Thanks in advance,


BUFFER:
Buffer header for buffer 0x67bd5800
page=0x67bd6000 bdnew=0xf84325d8 bdold=0xf843acd8 bhash=0xf83a3ce8
bmass_next=0xf8405560 bmass_prev=0xfb8aa4f0 bvirtpg=34813205 bdbid=13
bmass_head=0xf8435a58 bmass_tail=0xf8435a58 bcache_desc=0x53697900
bpool_desc=0x53696b80 bdbtable=0x54206500
Mass bkeep=0 Mass bpawaited=0 Mass btripsleft=0 Mass btripsleft_orig=0
bsize=2048 (2K pool) bunref_cnt=0
bmass_stat=0x45011000 (0x40000000 (MASS_CLOCK_SEEN), 0x04000000
(MASS_DONT_DISCARD), 0x01000000 (MASS_BUFPINPLC), 0x00010000 (MASS_DIRTY),
0x00001000 (MASS_HASHED))
bbuf_stat=0x1 (0x00000001 (BUF_PG_REF))
Buffer bpageno=1813 Mass bpageno=1813 (Buffer slot #: 0)
bxls_pin=0x0 bxls_next=0x0 bspid=0
bxls_flushseq=28896643 bxls_pinseq=28897356 bcurrxdes=0x0
Latch and the wait queue:
Latch (address: 0x67bd5820)
latchmode: 0x0 (FREE_LATCH)
latchowner: -1
latchnoofowners: 0
latchwaitq: 0x0 latchwaitqt: 0x0
Latch wait queue:
PAGE HEADER:
Page header for page 0x67bd6000
pageno=1813 nextpg=1814 prevpg=1812 objid=816005938 timestamp=0001 1864d4db
nextrno=20 level=0 indid=0 freeoff=1840 minlen=46
page status bits: 0x901 (0x0800 (PG_XHEADER), 0x0100 (PG_ADDEND), 0x0001
(PG_DATA))
second set of page status bits (dol_stat2): 0x02 (0x02 (PG2_DOL_DATAPG))
dol_pprivstat status bits: 0x00 (0x00)
pagesize=1, page version=1, ncfs=11, ndeleted=0, insert free space=77
pagetailts=0xd4db



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 06:08 PM
bret@sybase.com
 
Posts: n/a
Default Re: How to get a particular row from dbcc page.

What you have here is dbcc page output that just shows the page header.
This is what you would get with

dbcc page(dbid, page)
or
dbcc page(dbid, page, 0)

There are other print options that will show you the rows of data.

To see the rows of data on this page, run:

DBCC PAGE(dbid, page, 1)
go

To select the row from SQL, you will have to figure out from the raw
hex of the row what some key values might be. (There is no option
to dbcc page to print out the row like you would see it from a
select statement). This can be done with inspired guesswork or
rather tedious byte by byte diagraming if you happen to know how
row formats work (i.e. have taken the ASE Data Structures Internals
class). I usually try guesswork first.

-bret





Miguel García Fillion wrote:
> Hi there,
>
> How can I view a particular row from dbcc page?
>
> Below is the full dbcc page output. I was told that the row on this page is
> #19 (from nextrno which is 20).
>
> Now, how can I select this row #19 from the table? (I already know the table
> name from the object id).
>
> Thanks in advance,
>
>
> BUFFER:
> Buffer header for buffer 0x67bd5800
> page=0x67bd6000 bdnew=0xf84325d8 bdold=0xf843acd8 bhash=0xf83a3ce8
> bmass_next=0xf8405560 bmass_prev=0xfb8aa4f0 bvirtpg=34813205 bdbid=13
> bmass_head=0xf8435a58 bmass_tail=0xf8435a58 bcache_desc=0x53697900
> bpool_desc=0x53696b80 bdbtable=0x54206500
> Mass bkeep=0 Mass bpawaited=0 Mass btripsleft=0 Mass btripsleft_orig=0
> bsize=2048 (2K pool) bunref_cnt=0
> bmass_stat=0x45011000 (0x40000000 (MASS_CLOCK_SEEN), 0x04000000
> (MASS_DONT_DISCARD), 0x01000000 (MASS_BUFPINPLC), 0x00010000 (MASS_DIRTY),
> 0x00001000 (MASS_HASHED))
> bbuf_stat=0x1 (0x00000001 (BUF_PG_REF))
> Buffer bpageno=1813 Mass bpageno=1813 (Buffer slot #: 0)
> bxls_pin=0x0 bxls_next=0x0 bspid=0
> bxls_flushseq=28896643 bxls_pinseq=28897356 bcurrxdes=0x0
> Latch and the wait queue:
> Latch (address: 0x67bd5820)
> latchmode: 0x0 (FREE_LATCH)
> latchowner: -1
> latchnoofowners: 0
> latchwaitq: 0x0 latchwaitqt: 0x0
> Latch wait queue:
> PAGE HEADER:
> Page header for page 0x67bd6000
> pageno=1813 nextpg=1814 prevpg=1812 objid=816005938 timestamp=0001 1864d4db
> nextrno=20 level=0 indid=0 freeoff=1840 minlen=46
> page status bits: 0x901 (0x0800 (PG_XHEADER), 0x0100 (PG_ADDEND), 0x0001
> (PG_DATA))
> second set of page status bits (dol_stat2): 0x02 (0x02 (PG2_DOL_DATAPG))
> dol_pprivstat status bits: 0x00 (0x00)
> pagesize=1, page version=1, ncfs=11, ndeleted=0, insert free space=77
> pagetailts=0xd4db


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com