The row was not found at the subscriber when applying the replication command.-Urgent

The row was not found at the subscriber when applying the replication command.

I like to know cause of this issue.As per my investigation, there are row mismatch between publisher and subscriber.I like to know what was the mismatch causing this issue.How to find this information.
LVL 5
VIVEKANANDHAN_PERIASAMYAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
DcpKingConnect With a Mentor Commented:
You can write SQL that gets a list of all the tables (select * from sys.tables) on publisher.

Then create a table with fields TableName varchar, KeyValue varchar, Present varchar(3).

For each row in each table create a record in this table that stores the primary key in KeyValue and an indicator (probably "No" !) in Present.

Copy the table over to the subscriber machine and run the same code, but this time alter it so that if it finds the key already there it changes the value of Present

Finally see which rows still have the original value of Present.


It may take some time, but you'll have a way of doing it again in the future !

Good luck - hth

Mike
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
As per my investigation, there are row mismatch between publisher and subscriber.I like to know what was the mismatch causing this issue.How to find this information.
This kind of message typically occurs an update or a select based replication command is applied before the insert of the row is applied or after a delete replication command takes place on the row.  To determine the cause you need to identify which replication command is concerned first then determine at distributor level what is causing the sequence of transaction on the row to be incorrect.
0
 
VIVEKANANDHAN_PERIASAMYAuthor Commented:
It' possible someone have deleted or update the data in subscriber. I can understand your point.
But I'm more interested understanding the row mis-match.  between publisher and subscriber.

Please share me the how to get this information.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
Since replication is based on a primary key for a specific table, you simply need to identify the row that is in the publisher table that is not in the subscriber table.

You may identify the tables matching the article by looking on sys articles.  Please read

http://msdn.microsoft.com/en-us/library/ms187723.aspx

You can get the difference it simply by running

select key from published_table
except
select key from subscribed_table

Open in new window


Hope this helps.
0
 
VIVEKANANDHAN_PERIASAMYAuthor Commented:
Is this query needs to run on the distributor database?
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
Is this query needs to run on the distributor database?
You can do the following:
> import the table from the subscribed database into the published database
> run the query
0
 
VIVEKANANDHAN_PERIASAMYAuthor Commented:
Okay, so I have run this query againt all my tables present between publisher and subcriber.
Please correct me if I'm wrong. I'm newbie to replication.

I believe there should be someother options where we can check it.
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
I believe there should be someother options where we can check it.
I am not aware of any built in tool to show/adjust data discrepancies on an object basis for replication. But if you believe there is one, be my guest to look for it. (let me know if you find it :) )

Good luck
0
 
VIVEKANANDHAN_PERIASAMYAuthor Commented:
I got this articles to troubleshoot the issue.

http://sqldbpool.com/tag/sp_browsereplcmds/
please correct me if i'm in wrong direction.
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
Do as you wish but what is complicated about importing a table using the import wizard and running the query after identifying the key?
0
 
VIVEKANANDHAN_PERIASAMYAuthor Commented:
complicated - If I have 100 tables,then I have to check for 100 times. I think I'm wrong. Please correct my understanding.
0
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
In this case it would be better for you to drop and recreate entirely your replication.
0
 
VIVEKANANDHAN_PERIASAMYAuthor Commented:
Need some more tim to investigate
0
All Courses

From novice to tech pro — start learning today.