Solved

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

Posted on 2013-06-13
13
627 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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
 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server 2008 R2 service pack updates 5 44
Database maintenance 36 100
T-SQL Import data in Microsoft SQL Server Management Studio using INSERT 3 22
SQL server client app 3 27
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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