Search blog.co.uk

Posts archive for: 9 April, 2007
  • DBCC DBTABLE

    This command prints out the contents of the DBTABLE structure.

    Syntax:

    DBCC DBTABLE ({dbid|dbname})

    where
    dbid|dbname - database name or database ID

    This is the example:

    DBCC TRACEON (3604)
    DBCC DBTABLE (master)

    The DBTABLE structure has an output parameter called dbt_open.
    This parameter keeps track of how many users are in the database.

  • DBCC DBINFO

    Print DBINFO structure for specified database.

    Syntax:

    DBCC DBINFO [( dbname )]

    where
    dbname - is the database name.

    This is the example:

    DBCC TRACEON (3604)
    DBCC DBINFO (master)

  • DBCC BYTES

    This command can be used to dump out bytes from a specific address.

    Syntax:

    dbcc bytes ( startaddress, length )

    where
    startaddress - starting address to dump
    length - number of bytes to dump

    This is the example:

    DBCC TRACEON (3604)
    dbcc bytes (10000000, 100)

  • DBCC BUFFER

    This command can be used to print buffer headers and pages from the
    buffer cache.

    Syntax:

    dbcc buffer ([dbid|dbname] [,objid|objname] [,nbufs], [printopt])

    where
    dbid|dbname - database id|database name.
    objid|objname - object id|object name
    nbufs - number of buffers to examine
    printopt - print option
    0 - print out only the buffer header and page header
    (default)
    1 - print out each row separately and the offset table
    2 - print out each row as a whole and the offset table

    This is the example:

    DBCC TRACEON (3604)
    dbcc buffer(master,'sysobjects')

Footer:

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.