Groups | Blog | Home
all groups > sql server replication > august 2006 >

sql server replication : replication init on anynomoous subscriber


Darin
8/4/2006 7:58:28 PM
Server (distributor and publisher) SQL Server 2000, client MSDE XP Pro.

I create a merge subscription on the server. Many tables have row
filters. The client machine starts its software the first time, so it
creates its database and then sync's the data. This FIRST time, I need
to get all data that is on the server that matches the filter.

But, it is only getting the data when I either do a sp_mergedummyupdate
OR change the data (both on the server).

The client is using replication via SQLMERGXLib. I know there is an
initialize flag while creating the distribution, but I don't know if I
want to do that.

Any help?

Darin

Hilary Cotter
8/4/2006 11:52:03 PM
You need to create a dynamic snapshot to get this to work.

--
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



[quoted text, click to view]

Darin
8/6/2006 3:00:33 PM
I presume, after I create a dynmaic snapshot, I can copy the snapshot
over to the new subscriber. I am reading up on dynamic snapshots, and
might have more questions.
Thanks.

Darin

Hilary Cotter
8/7/2006 5:37:17 AM
The snapshot will automatically be distributed to the subscribers, other
than setting it up you don't need to do anything.

--
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



[quoted text, click to view]

Darin
8/7/2006 11:42:01 AM
I am reading the BOL for MergeDynamicSnapshotJob object and it says to
add a dynamic snapshot job to a merge publication, I have to set the
DynamicFilterHostName (name of subscriber) and DynamicFilterLogin (login
of subscriber). I assume the login of the subscriber is the SQL login. I
don't know the name of the subscriber as the user could add many new
subscribers and this snapshot needs to be for each one. Is the
DynamicFilterHostName the HostName() like I have setup in the Merge
Article?

Is there someplace that has how to setup a dynamic snapshot via DMO
somewhere?

Darin

Hilary Cotter
8/7/2006 9:16:48 PM
OK you have two options for dynamic snapshots, to filter dynamically on the
hostname of the subscriber, or to override this with the value of the
hostname parameter, or to filter dynamically on Suser_Name() which can be
overridden by the PublisherLogin account.

So to answer your question, it depends:) BOL is your best bet for how to
setup dynamic snapshots.

--
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



[quoted text, click to view]

Darin
8/8/2006 4:19:27 AM
It seems, in my reading, that the dynamic snapshot has to be built
knowing what the filter is. Meaning if I have 20 subscribers that each
only get a piece of the data, I would have 20 different dynamic
snapshots, one for each - is that correct?

If so, then I am thinking about having a function the user can run when
they get a new subscriber to create that subscribers snapshot, which
will just create the dynamic snapshot using DynamicFilterHostName = what
they enter as the new subscriber filter.

Let me know if that seems correct.

THanks.

Darin

Darin
8/8/2006 4:21:30 AM
Also, when is your new book on Merge Replication going to be published?
I am very looking forward to it.
THanks.

Darin

Darin
8/8/2006 5:24:36 AM
I created the dynamic snapshot via:

"exec sp_MSaddmergedynamicsnapshotjob @publication='SampleRS7'
, @dynamic_filter_login={login}, @dynamic_filter_hostname='7'
,@dynamic_snapshot_location='\\test\testrs'
, @dynamic_snapshot_jobname='SampleRS_7'
, @frequency_type=4, @frequency_interval=1
, @frequency_relative_interval=1
, @frequency_recurrence_factor=0
, @frequency_subday=1
, @frequency_subday_interval=5
, @active_start_date=0
, @active_end_date=0
, @active_start_time_of_day=500
, @active_end_time_of_day=235959


Since that is what the script looked like after I had created it via EM.

But, the snapshot agent won't start (can I start it via a SQL command?).
WHen I start it manually it doesn't seem to create anything in the
directory path (which does exist) - should it?

DOes a new dynamic snapshot have to be added and run for each new
salesman that is getting this? WHat if they add 2 now, and then a month
from now they add a 3rd? If the snapshot is run then for the 3rd
salesman, does it use the data as of now (a month later) or use the
snapshot's origianl data?

Darin

Darin
8/8/2006 8:45:37 AM
after I have run the adddynamicsnapshot command, I want it to run the
snapshot agent right now to create that dynamic snapshot - how can I do
that programatically.
Thanks.

Darin

Hilary Cotter
8/8/2006 11:41:19 AM
You get one large snapshot, and then 20 mini snapshots based on the large
snapshot. These mini snapshots are distributed to the subscribers.

--
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



[quoted text, click to view]

AddThis Social Bookmark Button