From: andsm on
sp_repldone in BOL have, in its description: "You can move forward or
backward in the list of replicated transactions."
I trying to move backward. Executing sp_repldone with parameters equal to
transaction which already was delivered. Log reader agent was stopped during
the test.
After execution of sp_repldone, I see:
Msg 18768, Level 16, State 1, Procedure sp_repldone, Line 1
The specified LSN {00000022:00000198:0004} for repldone log scan occurs
before the current start of replication in the log {00000022:000001a6:001d}.

The error looks strange, and contradict with BOL.
How I can move backward in list of replicated transactions?

And about why I want it. It is for case with failure of distributor. I want
to recreate distributor and start from last delivered to subscriber
transaction, I can get it from
MSreplication_subscriptions.transaction_timestamp
From: Paul Ibison on
I'm wondering how are you intending to "recreate the distributor". The
records marked as read from the published database could well have been
truncated so the log reader can't re-read them. You could consider using the
"sync with backup" option to avoid any potential issues.
HTH,
Paul Ibison