Solved

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

Posted on 2013-06-13
13
619 Views
Last Modified: 2013-07-21
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.
0
Comment
  • 6
  • 6
13 Comments
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39245466
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
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39245511
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
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39245535
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
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39245655
Is this query needs to run on the distributor database?
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39245811
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
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39245837
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39245863
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
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39246911
I got this articles to troubleshoot the issue.

http://sqldbpool.com/tag/sp_browsereplcmds/
please correct me if i'm in wrong direction.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39246920
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
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39247047
complicated - If I have 100 tables,then I have to check for 100 times. I think I'm wrong. Please correct my understanding.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 39247056
In this case it would be better for you to drop and recreate entirely your replication.
0
 
LVL 16

Accepted Solution

by:
DcpKing earned 500 total points
ID: 39247061
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
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39300768
Need some more tim to investigate
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now