Re: truncate log file for replication database

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi, Hilary,
I encountered problem when I tried the truncate the log file the 2nd time by
executing :

EXEC sp_repldone @xactid = NULL, @xact_segno = NULL,
@numtrans = 0, @time = 0, @reset = 1

The error is:
Executed as user: Servername\clrepl. Another log reader is replicating the
database. [SQLSTATE 42000] (Error 18752).

I tried to stop the log reader from the distributor, but seems no help.
Now I am unable to truncate the log file. :(

Very appreciate for any suggestion!

Shermaine

This will work, but you should not run into this problem. The log reader
should be able to keep up with the load unless you are doing large batch
updates/inserts or deletes.

You should be able to backup the log for it to reuse itself.

--
http://www.zetainteractive.com - Shift Happens!

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"xiaomei" <xiaomei@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6A329F4D-C17C-4710-9AA5-6BF1B2B3FD04@xxxxxxxxxxxxxxxx
Dear There,
We just start the transaction replication for the database few month back.
Due to the heavy transaction on the database, we schedule daily log file
trancation before the daily full db backup happen, however, we found the
log
file could not be truncated in the normaly way we did, it give the below
error:

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.

Finally I managed truncate the log file when the DB is on line and
without
stopping the replication, now I modify my scrip of truncation by add one
more
step bf the step:

EXEC sp_repldone @xactid = NULL, @xact_segno = NULL,
@numtrans = 0, @time = 0, @reset = 1

However, I am not sure this will 100% solve the problem, so just wondering
there must some standard way to truncate the log file for a live
replication
database.

Many Thanks for any suggustion!

Shermaine





.



Relevant Pages

  • Re: truncate log file for replication database
    ... We just start the transaction replication for the database few month back. ... Due to the heavy transaction on the database, we schedule daily log file ... Ensure the Log Reader Agent is running or use ... there must some standard way to truncate the log file for a live ...
    (microsoft.public.sqlserver.replication)
  • Re: truncate log file for replication database
    ... Kill all log reader agents you find in task manager, ... Looking for a SQL Server replication book? ... Now I am unable to truncate the log file. ...
    (microsoft.public.sqlserver.replication)
  • Re: Truncate Table in SQL Replication
    ... You will be unable to stop the log reader from reading the tlog. ... publication and do a nosync subscription. ... Looking for a SQL Server replication book? ... > Every night we need to truncate all tables and re-start replication. ...
    (microsoft.public.sqlserver.replication)
  • Re: truncate log file for replication database
    ... Looking for a SQL Server replication book? ... I encountered problem when I tried the truncate the log file the 2nd time ... We just start the transaction replication for the database few month ...
    (microsoft.public.sqlserver.replication)
  • Re: truncate log file for replication database
    ... Looking for a SQL Server replication book? ... We just start the transaction replication for the database few month back. ... Due to the heavy transaction on the database, we schedule daily log file ... there must some standard way to truncate the log file for a live ...
    (microsoft.public.sqlserver.replication)