Re: Transactional Replication - filtering records in child depending on data in parent table
- From: "Hilary Cotter" <hilary.cotter@xxxxxxxxx>
- Date: Wed, 4 Oct 2006 08:47:47 -0400
Could you script out your two tables, the parent and child and post them
here, or send them to me offline. It looks like I need the Customers and
Orders table as well as your filtering criteria.
I'll post the solution back here.
--
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
<ian.hingley@xxxxxxxxxxx> wrote in message
news:1159958230.936469.197620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Hilary
Thanks for your reply.
I've looked at merge replication, but this is a non-starter as SQL
Server tries to add its unique identifier column to each table. Our
application doesn't like that!!
When you say 'post your schema' what's my best method of doing this?
regards
Ian
Hilary Cotter wrote:
The perhaps good news is that this is done in merge replication and the
name
of this feature is called join filters. It is not so easy to do in
transactional replication.
Basically what you need to do is create a custom sync object involving an
indexed view. If you could possible post your schema for the parent and
child I'll show you how to do this.
--
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
<ian.hingley@xxxxxxxxxxx> wrote in message
news:1159795382.995021.317800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi.
I've set up transactional replication, distributing on a daily basis.
Let's pretend I have two related tables, customers and orders. I set up
a row filter on orders as follows:
SELECT <published_columns> FROM <<TABLE>> WHERE exists (
select * from customers where customers.verified=1 and
customers.custkey =
<<TABLE>>.custkey)
This works fine with the snapshot, only showing orders records where
the verified customer flag has been set. If there are orders for
unverified customers, these are not shown. Fine.
However, if subsequently a previously unverified customer record has
verified set to 1, the existing orders are still not displayed after
the next distribution. I assume this is because there is a transaction
against the customers table, but no transactions against the orders
table. There is therefore nothing to run the row filter against.
Is my assumption correct? If so, is there any way to get my 'child'
order records to be updated every time the 'parent' customer record is
changed? I have lots of data in lots of tables, and don't want to
re-snapshot on a daily basis to get round this. Am I missing something
obvious??
My schema and filter clause are much more complicated, but I hope the
example is simple enough to get the issue across.
Any help appreciated.
Regards
Ian Hingley
Swift LG Ltd
.
- Follow-Ups:
- References:
- Transactional Replication - filtering records in child depending on data in parent table
- From: ian . hingley
- Re: Transactional Replication - filtering records in child depending on data in parent table
- From: Hilary Cotter
- Re: Transactional Replication - filtering records in child depending on data in parent table
- From: ian . hingley
- Transactional Replication - filtering records in child depending on data in parent table
- Prev by Date: Re: Transactional replication - update does not follow row filter rules
- Next by Date: Re: Transactional replication - update does not follow row filter rules
- Previous by thread: Re: Transactional Replication - filtering records in child depending on data in parent table
- Next by thread: Re: Transactional Replication - filtering records in child depending on data in parent table
- Index(es):
Relevant Pages
|