Error 9215 (ASE 624)

The database log has been truncated.

Symptom

This message appears in the Adaptive Server error log:
2006/10/17 11:57:19.34 RepAgent (10) Error: 9215,
Severity: EX_USER, State: 1
The Secondary Truncation Point is not valid. Please make
sure that the Secondary Truncation Point is valid, and
then restart the Rep Agent Thread for this database.

Explanation

This error occurs when the log is truncated past the secondary truncation point and the RepAgent tries to reconnect to the database. RepAgent requests the log page number from the Replication Server and then accesses that page in the database. Because the log was truncated, the RepAgent will not start.

Attempts to retrieve rows from the page using the row identifier (RID) fail because the requested RID is a higher value than the last RID on the page. For example, truncating the log frees only those log pages that the RepAgent has sent to the Replication Server with confirmation.

Solution

Because you truncated the log, you must reset the information about the database log in the rs_locater table within the Replication Server System Database (RSSD).
  1. In the RSSD, execute:
    > rs_zeroltm primss, primdb
    > go
  2. In the primary database, reactivate the secondary truncation point:
    > dbcc settrunc(ltm, valid)
    > go
  3. Restart RepAgent.

Check for open transactions by comparing the output of dbcc gettrunc with the content of the rs_locater tables attribute locater. Truncating the transaction log may have caused orphaned transactions, which occur when the transaction’s begin statement is transferred, but the commit or rollback statement is accidentally deleted during log truncation.