dbcc dbrepair

A Transact-SQL command that clears the secondary truncation point for an offline replicated database.

Syntax

dbcc dbrepair(database_name, ltmignore)

Parameters

Usage

  • dbcc dbrepair clears the secondary truncation point for offline databases; dbcc settrunc with the ignore option clears the secondary trunction point for online databases.

  • Sybase recommends that you drain the transaction log and clear the secondary truncation point for a replicated database before starting an upgrade. If you have not performed these two tasks, Adaptive Server does not allow you to bring the database online after upgrade.

  • If you do not drain the transaction log and clear the secondary truncation point before upgrade, use dbcc dbrepair so that Adaptive Server can bring the database online.

    Before running dbcc dbrepair:

    1. Start the RepAgent thread on the offline database.

    2. Drain the transaction log.

    If you do not drain the transaction log before running dbcc dbrepair, all transactions in the log are lost.

Related reference
dbcc settrunc