Replication in SQL Server 2005 deleting records

5 pts.
Tags:
Replication
SQL Server 2000
SQL Server 2005
We just converted from SqL 2000 to 2005. We were replicating from 2 instances on the same server every 30 minutes. A record from Intsnace A was copied to Instance B, then the record in A was deleted. Worked great for years. Now with 2005 it is deleting the records on B on the second pass. We think it is performing the delete function from the last replication process. anybody hear of this or know how to stop the delete action from being performed?

Answer Wiki

Thanks. We'll let you know when a new response is added.

The records on instance B are supposed to be deleted. That’s the default behavior of replication.

If you look inside the database on instance B you should see some funky stored procedures that you didn’t create. Edit the delete one(s) for the table(s) that you don’t want the data deleted from. After the CREATE PROCEDURE ProcedureName … AS put a RETURN(0) to break of the procedure before the record is actually deleted. The procedure will look something like this.

<pre>CREATE PROCEDURE <i>ProcedureName</i>
@Column1 <i>DataType</i>

@LastColumn <i>DataType</i>
AS
RETURN(0)

GO</pre>

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following