Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Monday, March 12, 2012

Find out whether a database is merge subscriber

Hi,
maybe someone can help me with this one.
I need to find out via T-SQL whether a specific database is a subscriber
of a merge publication. The publisher might not be available when
querying this.
I would have expected bit 4 (value 8) of
master.dbo.sysdatabases.category to be set; however, it isn't in my
replicated databases (maybe just for snapshot replication?)
Thanks for any help on this!
Roland
Roland,
you should be able to find the publication in sysmergesubscriptions on the
subscriber.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Sunday, February 19, 2012

Filters - A good way to limit data at subscribers?

We use merge replication where data created at a control centre, then
modified in a filtered publication at the subscribers. We currently have
about 100 subscribers.
Publication is filter is WHERE LocationRef=XXX
We need to retain data at the control centre but not at subscribers, so does
it make sense to alter the filter to somthing like WHERE LocationRef=XXX AND
VisitDate>YYYY to achieve this, thereby reducing the data stored at each
subscriber?
Tony Toker
Data Identic Ltd.
This is not the correct way to do this.
What will happen is that data which is modified at the publisher or
subscriber will be merged if it meets the filtering criteria. However as the
data ages at the publisher or subscriber it will remain there, unless there
is a job which deletes/archives these rows so the merge replication process
will identify them as changed and then delete them from the publisher and
susbcriber. You would probably want to initiate the delete on the subscriber
to remove them there, but retail them on the publisher.
"Tony Toker" <xyzzy@.identic.co.uk> wrote in message
news:cqbl9o$dkv$1$8300dec7@.news.demon.co.uk...
> We use merge replication where data created at a control centre, then
> modified in a filtered publication at the subscribers. We currently have
> about 100 subscribers.
> Publication is filter is WHERE LocationRef=XXX
> We need to retain data at the control centre but not at subscribers, so
does
> it make sense to alter the filter to somthing like WHERE LocationRef=XXX
AND
> VisitDate>YYYY to achieve this, thereby reducing the data stored at each
> subscriber?
> Tony Toker
> Data Identic Ltd.
>

Filtering with Replication

Hi,
I have to replication a database with a merge replication type
In that database there are 4 tables that I dont need on the subscribers
I use a pull subscriptions
I try to do a publication with out those tables but i received a message
saying that those tables have dependencies on other tables.
What the best way to manage this situation
Those tables are very large and there are long to copy from the Publisher to
the Subscribers.
I try using the row filtering but I think I dont understand what rows
filtering works because after doing few test the replication was reacting the
same way as with out row filtering.
Thanks in advance !
ignore this message and move on. Let me try to explain how this option
works. Suppose you are filtering on the orders table, orders detail table
and the customers table. You filter on the customers table by StateID. The
CustomerID column is also in the orders table, but not in the orders detail
table.
A CA customer moves to a different state (NY) and so the record for this
customer leaves the Customers table. But as there is no filter by state on
the orders table or the orders detail table, his orders remain in CA. Merge
replication is able to walk the DRI and drag the customers order, and order
details rows with him when he moves to NY from CA in something called
partition realignment.
If you are only replicating a single table, merge walks the DRI and tells
you that the related records are not going to move with this customer which
probably is not what you want.
This is a very complex topic so if you need more info, please post back.
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
"GC" <GC@.discussions.microsoft.com> wrote in message
news:FA0E0960-370C-41B6-B5E4-533DACA4FC06@.microsoft.com...
> Hi,
> I have to replication a database with a merge replication type
> In that database there are 4 tables that I dont need on the subscribers
> I use a pull subscriptions
> I try to do a publication with out those tables but i received a message
> saying that those tables have dependencies on other tables.
> What the best way to manage this situation
> Those tables are very large and there are long to copy from the Publisher
> to
> the Subscribers.
> I try using the row filtering but I think I dont understand what rows
> filtering works because after doing few test the replication was reacting
> the
> same way as with out row filtering.
> Thanks in advance !
>
>
>