all groups > sql server replication > october 2004 >
You're in the

sql server replication

group:

Log Reader problem


Log Reader problem Roger
10/29/2004 12:35:44 PM
sql server replication:
Hello all,

I am seeing a rather odd replication issue, thats new to me and I was
wondering of anyone could provide insight on how to resolve it.

I have several SQL servers (SQL2k w/ all patches and SP) replicating
several databases via a transactional replication. There have been no
problems with the replication for months. Right now, all the replication on
a single DB is failing, because the log reader is halted on all of the
replications. The log reader gives the following error message:

The process could not execute 'sp_repldone/sp_replcounters' on 'RepServ'.

The specified LSN (0000456a:00007554:0001) for repldone log scan occurs
before the current start of replication in the log (00004576:00001128:0115).
(Source: RepServ (Data source); Error number: 18768)
----------------------------------------------------------------------------
-----------------------------------
The process could not set the last distributed transaction.
(Source: RepServ-PilotDBLive-6 (Agent); Error number: 22017)
----------------------------------------------------------------------------
-----------------------------------

Now, this seems fairly straightforward, the next transaction that is to
be replicated isn't in the transaction log. Recently, a tech truncated the
SQL agent log because it was full, and this might be a side effect. (Don't
understand why, as replication transactions aren't stored in SQL agent log
to my knowledge, but whatever, the problem now exists.) I looked up the SP
in the db, and there is a method that sp_repldone can be called that might
fix the problem, but it requires the DB to be unpublished and republished:

"When xactid is NULL, xact_seqno is NULL, and reset is 1, all replicated
transactions in the log are marked as distributed. This is useful when there
are replicated transactions in the transaction log that are no longer valid
and you want to truncate the log, for example:
EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time
= 0, @reset = 1"
The goal is to get the log reader going without rebuilding the
replication (Which would be a huge time sink.). Suggestions?
Thanks in Advance,
Roger


Re: Log Reader problem Hilary Cotter
10/29/2004 10:18:41 PM
transactions to be replicated remain in the tlog until read by the log
reader agent, transformed into singletons, stored procedures with parameters
for these singletons are created, and written to the distribution database,
and then the transactions in the log are marked as replicated.

To fix this problem you need to remove the msrepl_transactions table to
reflect the current LSN in the log. It looks like you need to remove the
transactions up to
00004576:00001128:0115.

You should not do this without consulting PSS and having them asses your
problem. As you work for Microsoft you should be able to raise a support
incident with PSS to handle your problem quickly.

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


[quoted text, click to view]

Re: Log Reader problem Michael Koesling via SQLMonster.com
11/8/2004 4:24:06 PM
Hello,

PLEASE HELP, I have got the same problem like Roger!

After restoring some user-database and sending the command to reinitialize I got the error message (after restoring was okay I did nothing with the distribution db):

------------------------------------------------
The specified LSN (000000b0:0000167c:0007) for repldone log scan occurs
before the current start of replication in the log (000000b2:0004a3d:0007).
(Source: RepServ (Data source); Error number: 18768)
------------------------------------------------
The process could not set the last distributed transaction.
(Source: RepServ-PilotDBLive-6 (Agent); Error number: 22017)
------------------------------------------------

I have got the following entries in my msrepl_transactions:
------------------------------------------------
1 0x0000003800003C5C0001 0x0000003800003C5C0004 2004-10-15 16:36:48.167
2 0x0000001C000001410001 0x0000001C000001410004 2004-10-16 09:38:37.530
2 0x000000000000 0x0000001C00000141000400000003 2004-11-08 15:54:57.020
3 0x000000B00000167C0001 0x000000B00000167C0007 2004-10-16 07:30:06.157
3 0x000000000000 0x000000B00000167C000700000002 2004-11-08 15:55:15.423
------------------------------------------------

Could anybody tell me **exactly** what to do that the the log reader is running properly again!
Do I have to make something at the subscriber

Please excuse for my english, I'm from Germany!

Thaks in advance
Michael

*****************************************
* A copy of the whole thread can be found at:
* http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-replication/4230
*
* Report spam or abuse by clicking the following URL:
* http://www.sqlmonster.com/Uwe/Abuse.aspx?aid=0382caa5822f48dbad8cca19041d0552
AddThis Social Bookmark Button