You are here: Re: Filter records during Transactional Replication. « MsSQL Server « IT news, forums, messages
Re: Filter records during Transactional Replication.

Posted by Hilary Cotter on 04/13/07 12:35

Basically it looks like you are doing soft deletes.

In this case you want a filter on your table that looks like this where
deleteddate is null

Then you want to modify your modify replication proc so that if the update
for this table involves a value for the deleteddate column that it does not
update this row but rather deletes it.

But I'm a little confused - you say " if i see a value on the DeletedDate, I
don't want that record to be picked up for replication."

But then in the next statement you say "when someone marks the record for
deletion (by putting a date on the DeleteDate column), I want that record to
be
deleted on the subscriber database"

These sound like mutually exclusive statements.

--
Hilary Cotter

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



"Query Builder" <querybuilder@gmail.com> wrote in message
news:1176401346.580157.314620@e65g2000hsc.googlegroups.com...
> Hi All,
>
> I have a table with a column DeletedDate which stores a logical delete
> of a record.
>
> I need to set up transactional replication for reporting purposes that
> this deleted records should not be replicated to the subscriber. That
> is, if i see a value on the DeletedDate, I don't want that record to
> be picked up for replication.
>
> At the same time, when someone marks the record for deletion (by
> putting a date on the DeleteDate column), I want that record to be
> deleted on the subscriber database. (I can also set up a job to do the
> deletes on the subscriber but i'd rather let the replication take care
> of it).
>
> Can this scenario be implemented in Microsoft SQL 2000? I would
> appreciate any ideas / thoughts in this matter.
>
> Thanks in advance,
> Aravin Rajendra.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация