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

sql server replication : Merge Replication Problem


Bonato Pierantonio
4/7/2006 12:00:00 AM
Hi all I have a problem !!!
I use a Merge replication between 2 SQL Servers (I try with PUSH or PULL
Subscription but same problem)
Each morning in the server A I have scheduled an Import from exterenal data
( I make a DELETE all table and INSERT al data each morning)
After I schedule the creation of Snapshot in the Publisher and each hour is
scheduled the Merge replication (PUSH or PULL is the same)

The result is that in the Subscriber it make correctly the DELETE but not
the INSERT, the table in the Subscriber is empty and for all the day it says
"No merge data to replicate"

If manually it make the reinitialization in the Subscription, next merge
replication work perfectly and it works for all the day until next morning
when the script make the Import (DELETE with INSERT)

Some suggestions??? Please....

Thanks a lot
Bonato Pierantonio, MCSD

Paul Ibison
4/7/2006 12:00:00 AM
Bonato - how are you doing the insert? There are 2 common reasons why the
merge triggers don't fire:
(1) If you bulk insert the rows and choose the defaults, then FIRE_TRIGGERS
is false and consequently the rows are not added to MSmerge_contents.

(2) If you do a fast-load using the Transform Data task in DTS

Fixing either of these will help new imports. In the case of already-added
rows which need replicating, you need to run sp_addtabletocontents to
include the rows then resynchronise. Alternatively you can use
sp_mergedummyupdate for a single row. For the fast load case, in future if
you deselect the check box the triggers will fire.

Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Bonato Pierantonio
4/7/2006 12:00:00 AM
Thanks for your help....

My case is the 2 I use the DTS to import the data.... but I do not
understand how to implement your suggestion....can you explain me better
(sorry but I am not so expert...) I need to run manually the sp? Is possible
to do everything automatically?

Thanks again
Bonato Pierantonio,MCSD


"Paul Ibison" <Paul.Ibison@Pygmalion.Com> ha scritto nel messaggio
news:uivrkxiWGHA.4620@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

Paul Ibison
4/7/2006 2:11:33 PM
Bonato,
please have a look at the graphic on this page:
http://www.replicationanswers.com/Merge.asp. Yu need to uncheck the Use Fast
Load box then it'll fire the triggers automatically.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)




AddThis Social Bookmark Button