Angelo SIlva (3/27/2014)
Hello All,The data is inserted in our Database db 1 in Table1 and replicates the data to the customer database db2 in table1 then the customer database db2 from table2 replicates the confirmation of receiving that record to our database db1 to table2 and this last part is when the error occur. We don't have access to the data from customer side or the server.
This confirmation process must be a custom process you have created. What inserts/updates the date in db2.table2?
Have you confirmed the error command?
USE distribution
GO
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SET NOCOUNT ON
DECLARE @SeqNo NCHAR(22)
DECLARE @SeqnoB VARBINARY(16)
DECLARE @cmdID INT
DECLARE @publisher_db_id INT
DECLARE @article_id INT
DECLARE @Time DATETIME
SELECT DISTINCT
@Seqno = master.dbo.fn_varbintohexstr(Re.xact_seqno)
, @SeqnoB = RE.xact_seqno
, @cmdID = RE.command_id
, @publisher_db_id = RC.publisher_database_id
, @Time = RE.[time]
, @article_id = RC.article_id
FROM Distribution.dbo.MSrepl_errors RE WITH ( NOLOCK )
INNER JOIN Distribution.dbo.MSrepl_commands RC WITH ( NOLOCK ) ON RC.xact_seqno = RE.xact_seqno
AND RC.command_id = RE.command_id
WHERE RE.time BETWEEN DATEADD(mi, -5, GETDATE()) AND GETDATE()
ORDER BY RE.time DESC
IF @SeqNo IS NOT NULL
AND @publisher_db_id IS NOT NULL
AND @cmdID IS NOT NULL
BEGIN
EXEC sp_browsereplcmds @xact_seqno_start = @SeqNo,
@xact_seqno_end = @SeqNo,
@publisher_database_id = @publisher_db_id, @command_id = @cmdID -- Show all subscribers for the article that has errored
SELECT SS.Name AS [Subscriber]
, S.Subscriber_DB AS [Target Database]
FROM Distribution.dbo.MSsubscriptions S WITH ( NOLOCK )
INNER JOIN sys.servers SS WITH ( NOLOCK ) ON SS.Server_ID = S.Subscriber_ID
WHERE publisher_database_id = @publisher_db_id
AND article_id = @article_id
ORDER BY SS.Name
, S.Subscriber_DB
END
ELSE
BEGIN
SELECT 'No Errors Found'
END