Show TOC

dbcc dbrepairLocate this document in the navigation structure

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

Syntax
dbcc dbrepair(<database_name>, ltmignore)
Parameters
database_name

The name of the database for which you want to clear the secondary truncation point.

ltmignore

Deactivates the secondary truncation point in the named database.

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.

  • SAP 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.