Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Replication / March 2006

Tip: Looking for answers? Try searching our database.

Conditional Deletion in Replication

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
emreeves - 30 Mar 2006 22:33 GMT
I am developing a transactional replication plan.  I have one table
that most of the time I do not want to replicate deletions.  There is
an exception to this rule.  If the status_id of another table is false,
then the deletion should be replicated.

I have been having difficulty trying to put this condition in place.  I
have tried modifying the sp_MSdel_dboTable stored procedure.  I have
removed the if @@rowcount check and replication errors with the
messages:

--  Error executing a batch of commands.  Retrying individual commands.

Eventually, it will fail with the message:  if @@trancount > 0 rollback
tran

Any ideas on how to get around this issue?

Publisher:  SQL 2000
Distributor:  On a separate server
Subscriber:  SQL 2005

Thanks for any help I can get.
Hilary Cotter - 30 Mar 2006 23:32 GMT
You need to replicate an indexed view as a table on the subscriber. The
indexed view would only "show" rows which match the status_id in the other
table.
Signature

Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

>I am developing a transactional replication plan.  I have one table
> that most of the time I do not want to replicate deletions.  There is
[quoted text clipped - 18 lines]
>
> Thanks for any help I can get.
emreeves - 30 Mar 2006 23:42 GMT
Thanks!  This sounds better than the next approach I was going to
try... creating a 1st Insert/Update trans replication, and a 2nd Delete
only with row filtering.

BTW -  Thanks very much for your replication book.  It has helped loads
this past few weeks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.