Re: truncate log file for replication database
- From: xiaomei <xiaomei@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Nov 2007 20:20:00 -0800
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
- Follow-Ups:
- Re: truncate log file for replication database
- From: Hilary Cotter
- Re: truncate log file for replication database
- References:
- Re: truncate log file for replication database
- From: Hilary Cotter
- Re: truncate log file for replication database
- Prev by Date: Re: SQL Server replication
- Next by Date: Re: Determining Tranasctional Replication Latency thru TSQL
- Previous by thread: Re: truncate log file for replication database
- Next by thread: Re: truncate log file for replication database
- Index(es):
Relevant Pages
|