http://goo.gl/EmKxy0

Home > ASE > Relation between sysdevices, sysdatabases and sysusages

Relation between sysdevices, sysdatabases and sysusages

Pre 15.x Version

===============

1. Virtual Page Number: Virtual Page number is unique across the server, always in 2k size. Does not depend upon server page size.

2. Logial Page number : Unique across a database. Depends upon the page size of server ( 2k, 4k, 8k and 16k)

3. vdevno from sysdevice as vedno(low/2power24)&255

4. The high Order four bits of sysusage.vstart stores the virtual device number and can be calculated as vdevno=(vstart/2pow24)&255

sysdevices.low : Starting vitual page for a devices and generally calculated as vedvno*2power24

sysdevices.high : Last vitual page of the device allocation

Device Size: (sysdevices.high – sysdevices.low+1)

sysdatabase.dbid : Database Id for a database.

sysusages.vstart : is the vitual page number from where the database fragment starts

sysusages.lstart : Is the start of the logical page number

sysusages.size : Number of contiguous database (logical) pages

sysusages.dbid : Database id for  fragment.

 vstart of a database fragment is lying between the low and high of device used.

 

Version 15.x

===============

1. Virtual Page Number: Virtual Page number is unique across the device, always in 2k size. It does not depend upon server page size.

2. Logial Page number : Unique across a database.

3. Now, device identification number is stored in the vdevno column and no longer as part of the high or low column.

and also no longer as part of the sysusage.vstart column.

sysdevices.low : Generally Zero , block offset of virtual page in 2K page if there is offset with vstart parameter of disk init.

sysdevices.high : Last virtual page of the device allocation

sysdevices.vdevno : Virtual device number for a device (for master device =0 and maximum value is defined by number of devices config parameter)

Device Size : (sysdevices.high – sysdevices.low+1)

sysdatabase.dbid : Database Id for a database.

sysusages.vstart : is the virtual page number from where the database fragment starts in a device specified by vdevno

sysusages.lstart : Is the start of the logical page number of the database.

sysusages.size : Number of contiguous database (logical) pages

sysusages.dbid : Database id for  fragment.

sysuages.vdevno : Vdevno of device on which database fragment is created.

These global variable always represents as

@@maxpagesize – logical page size

@@pagesize – virtual page size

 

Source : sybooks

Check the Sybase Wiki @ sybasewiki.com
Categories: ASE Tags:
  1. infant_dba
    April 16th, 2012 at 09:13 | #1

    nice document..

  1. No trackbacks yet.