all groups > sql server replication > june 2006 >
You're in the

sql server replication

group:

Table-driven partition criteria


Table-driven partition criteria dzman49
6/7/2006 10:05:05 AM
sql server replication:
I'm having difficulty implementing table-driven partitioning for a
merge replication/pull subscription scheme (SQL2K, SP4).

I want to use a view in the WHERE clause of the article's partition
spec as:
iOfficeNum in (Select iOfficeNum from dbo.vw_GetOfficeNumList)
The view returns a different list on each subscriber. On the
publisher, it returns a complete list (corresponding to all partitions
on the article).

Only rows in the publisher (whether updated, inserted or deleted)
belonging to a particular subscriber's partition should be replicated
in that subscriber, but that's not the case in the tests I've made.
New rows inserted into the publisher get replicated into the subscriber
whether the match the partition filter or not.

What am I missing?

I thought the point of the 'Pull' (vs. Push) subscription was that,
during synchronization, the partition criteria would be evaluated by
the merge agent on the subscriber's server and filter accordingly.
Re: Table-driven partition criteria dzman49
6/8/2006 12:33:06 PM
I figured out my rookie mistake (did I mention I was new at this?).

I thought "evaluated by the merge agent from the subscriber's server"
meant that the filter expression (view) would be evaluated using tables
on the subscription database.

Wrong.

Regardless of the subscription, only the view on the publication
database is ever evaluated. It always returns a complete list,
therefore it fails to partition any article.

There's no way around a SubscriptionServerName -> PartitionValue
mapping table on the pub db.
AddThis Social Bookmark Button