A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Data Storage

Object allocation map pages, OAM pages

Object allocation map pages or OAM pages store pointers to allocation units, containing data pages for objects like for example tables, indexes or text chains. Every user object, i.e. every table, Index and text- chain, contains one or more OAM pages. They reside on the pages, allocated to the object. If objects contain more than one OAM page, these are linked to each other as so-called linked page chains.

The first OAM page in a linked OAM page chain stores the allocation pointers. Additionally, it contains information on which OAM page within the page chain points to free allocation units for data storage. This way, connected data pages can be kept physically close together.

Linked OAM page chains form an OAM ring with the last OAM page pointing to the first. The below example illustrates this for the table "table_name":

    select id from sysindexes where id = object_id("table_name")
    go
    id          
    ----------- 
    675390071 

    select id, doampg, indid from sysindexes where id = 675390071
    go
    id          doampg      indid  
    ----------- ----------- ------ 
    675390071     1697752      0

    dbcc pglinkage(4, 1697752, 0, 2, 0, 0)
    go
    Object ID for pages in this chain = 675390071.
    Page : 1697752
    Page : 32370232
    2 pages scanned.  Object ID = 675390071.  Last page in scan = 32370232.

    dbcc page(4, 1697752, 0)
    go

    Page found in Cache: default data cache. Cachelet: 9

    BUFFER:
    Buffer header for buffer 0x24e262800 
        page=0x24e262000 bdnew=0x40b9462b8 bdold=0x40b9462b8 bhash=0x0
        bmass_next=0x40dbe3280 bmass_prev=0x40dbe31b8 bvirtpg=840558552 bdbid=4
        bmass_head=0x40b9462b8 bmass_tail=0x40b9462b8 bcache_desc=0x24e2790e8
        bpool_desc=0x24e29ac88 bdbtable=0x21b05bc40
        Mass bkeep=0 Mass bpawaited=0 Mass btripsleft=0 Mass btripsleft_orig=0
        bmass_size=2048 (2K pool) bunref_cnt=0
        bmass_stat=0xffffffffc4001010 (0x80000000 (MASS_FLUSHED), 0x40000000 (MASS_CLOCK_SEEN),
        0x04000000 (MASS_DONT_DISCARD), 0x00001000 (MASS_HASHED), 0x00000010 (MASS_INWASH))
        bbuf_stat=0x1 (0x00000001 (BUF_PG_REF))
        Buffer blpageno=1697752 bpg_size=2k Mass blpageno=1697752 (Buffer slot #: 0)
        bxls_pin=0x0 bxls_next=0x0 bspid=0
        bxls_flushseq=0 bxls_pinseq=0 bcurrxdes=0x0 
    Latch and the wait queue:
    Latch (address: 0x24e262830)
            latchmode: 0x0 (FREE_LATCH)
            latchowner: -1
            latchnoofowners: 0
            latchwaitq: 0x0 latchwaitqt: 0x0
    
    Latch wait queue:
    
    PAGE HEADER:
    Page header for page 0x24e262000
    pageno=1697752 nextpg=32370232 prevpg=32370232 objid=675390071 timestamp=000b b3e2f818
    oampgcount=2 attrcount=10 indid=0 totalentries_lo=402 entrycount=240
    page status bits: 0x8008 (0x8000 (PG_OAMPG), 0x0008 (PG_OAMATTRIB))

    dbcc page(4, 32370232, 0)
    go

    Page found in Cache: default data cache. Cachelet: 14

    BUFFER:
    Buffer header for buffer 0x24e262800 
        page=0x24e262000 bdnew=0x419b8eb70 bdold=0x419b8eb70 bhash=0x0
        bmass_next=0x41be35cf0 bmass_prev=0x419ba2008 bvirtpg=959999544 bdbid=4
        bmass_head=0x419b8eb70 bmass_tail=0x419b8eb70 bcache_desc=0x24e284bc8
        bpool_desc=0x24e2a37c0 bdbtable=0x21b05bc40
        Mass bkeep=0 Mass bpawaited=0 Mass btripsleft=0 Mass btripsleft_orig=0
        bmass_size=2048 (2K pool) bunref_cnt=0
        bmass_stat=0xffffffffc4001010 (0x80000000 (MASS_FLUSHED), 0x40000000 (MASS_CLOCK_SEEN), 
        0x04000000 (MASS_DONT_DISCARD), 0x00001000 (MASS_HASHED), 0x00000010 (MASS_INWASH))
        bbuf_stat=0x1 (0x00000001 (BUF_PG_REF))
        Buffer blpageno=32370232 bpg_size=2k Mass blpageno=32370232 (Buffer slot #: 0)
        bxls_pin=0x0 bxls_next=0x0 bspid=0
        bxls_flushseq=0 bxls_pinseq=0 bcurrxdes=0x0 
    Latch and the wait queue:
    Latch (address: 0x24e262830)
            latchmode: 0x0 (FREE_LATCH)
            latchowner: -1
            latchnoofowners: 0
            latchwaitq: 0x0 latchwaitqt: 0x0
    
    Latch wait queue:
    
    PAGE HEADER:
    Page header for page 0x24e262000
    pageno=32370232 nextpg=1697752 prevpg=1697752 objid=675390071 timestamp=000b b3e2f819
    oampgcount=1 attrcount=0 indid=0 totalentries_lo=0 entrycount=162
    page status bits: 0x8000 (0x8000 (PG_OAMPG))