January 31, 2006 at 12:06 pm
I am in the process of truncating log and shrinking due to other reasons
I did issue below command to truncate and backup log
BACKUP LOG DatabaseName WITH Truncate_only
Backup log databasename to disk=’path’
When I executed these commands SQL Server thrown error message
The log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed.
so
Following below procedure to truncate a database
Published the database in Transactional Replication
Issued the following command:
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time = 0, @reset = 1
Truncate the log using the following command:
BACKUP LOG DatabaseName WITH truncate_only
Dropping the publication
At the end of truncate the log step
SQL thrown an error message Another Log reader is running, the log was not truncated because records at the beginning of the log are pending replication. Ensure the Log Reader Agent is running or use sp_repldone to mark transactions as distributed.Truncation failing.
Please help
Thanks in advance
January 31, 2006 at 12:16 pm
Try running sp_repltrans to get the transactions that are not being marked as sent to the distributor.
HTH,
Mark
January 31, 2006 at 2:52 pm
you mean I have to run sp_repldone with @xactid and @xact-seqno that are not being marked as sent to distributor.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply