Is it possible to define 2 merge publications that contain same tables (one
publication has dynamic filters, the other hasn't) and to subscribe the same
DB to them?
--- Details ---
I have a HQ DB on SQL Server 2005, and a couple of hundreds of client DB's,
installed on laptops with SQL Server Express Edition (using DISTRIB.EXE &
REPLMERG.EXE for synchronizing).
I defined 3 publications with pull subscriptions:
- a transactional publication with global tables changed only at HQ - this
work fine
- one merge publication using dynamic filter SUSER_SNAME on one table (lets
say table A), the rest of the tables are filtered by using joining
- some tables that are used in the joins of the first merge publication, are
global tables (table A, where I put the dynamic filter, and tables B & C) -
so I put them in an other merge publication with no filters at all, defining
the tables A, B & C as "download only".
Client DBs structure is identical with HQ DB structure (including indexes,
PK, FX...), so I need to replicate only the data (and replication objects).
After defining the publication and the test subscription DB (on the same
server) everything seemed to work OK, but when I tried to define a new test
DB & subscription using generated scripts, I couldn't apply the snapshot for
merge publications. I got the error:
"Source: Merge Replication Provider
Number: -2147200976
Message: The subscription could not be initialized using an initial snapshot
because one or more tables in the subscription belong to another publication,
and therefore cannot be dropped. Consider initializing the subscription
manually without using a snapshot."
So I stood there with TestDB_1 working and TestDB_2 couldn't initialize. I
tried to change publication & subscription properties, article properties, I
even dropped and recreated the publications and subscriptions - but I
couldn't make the snapshot to work on TestDB_2. Even more, I cannot do that
in TestDB_1 anymore!!!!
I don't write here all the parameters that I've changed, because there are a
lot of them - maybe only one or two of them are important?
Can this be accomplished or I've only dreamed about that replication
structure working?
I would appreciate any help, Thank you