This error message is displayed 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.
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 via 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.
Because you truncated the log, you must reset the information about the database log in the rs_locater table within the RSSD as follows.
Execute the following stored procedure in the RSSD:
> rs_zeroltm primss, primdb > go
Activate the secondary truncation point again in the primary database.
> dbcc settrunc(ltm, valid) > go
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. Orphaned transactions occur when the transaction’s begin statement is transferred, but the commit or rollback statement is accidentally deleted during log truncation.