dbcc gettrunc

A Transact-SQL command to retrieve current RepAgent information about an Adaptive Server database.

Syntax

dbcc gettrunc

Usage

  • Use dbcc gettrunc for RepAgent-enabled databases.

  • The dbcc gettrunc command returns a single row containing the columns as shown:

    Columns Returned by dbcc gettrunc

    Column Name

    RepAgent

    Contents

    secondary trunc page

    The first page that is not truncated in the database log

    secondary trunc state

    One of these values:

    • 1 – Adaptive Server does not truncate the log on or after the truncation page

    • 0 – Adaptive Server ignores the truncation page

    db rep stat

    A mask constructed of the following:

    • 0x01 – Secondary truncation page is valid

    • 0x02 – Database contains at least one explicitly replicated table

    • 0x04 – Database contains replicated stored procedures

    • 0x08 – Replicate all to standby database

    • 0x10 – Replicate L1 to standby database

    • 0x80 – Replication Agent automatically restarts after an HA failover

    RepAgent only:

    • 0x20 – RepAgent enabled

    • 0x40 – Autostart RepAgent

    generation id

    The database generation ID

    database id

    The Adaptive Server ID number of the database

    database name

    The name of the database

    ltl version

    RepAgent: The log transfer language (LTL) version

Note: There is no difference in replicating L1 and all to standby database because to date, only support level L1 has been implemented in Adaptive Server version 12.0 and later. For more information, see sp_reptostandby.
Related reference
admin get_generation
dbcc settrunc