Hello,
we have started to replicate our live database to a remote test server. Both servers are running "Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)"
Our software uses two databases - first one holds the client data and the other one is for history data changes. The history data are written by triggers. We only want to replicate the first one with the client data.
I setup a new publication on the first server where our live database runs. After that I setup my publication as a “Merge publication”, for Subscriber type “SQL Server 2008” and so on…
My setup for a new subscription for the remote test server is “Run each agent at its Subscriber (pull subscriptions)”. The agent schedule is “Run continuously”, subscription type is set to “Client”.
Everything works fine - if I do some data changes on the publication database then the SQL Server replicates the data to the subscriber – that’s ok, but it’s too slow.
We recognized on the subscriber that the history trigger fires for each column one time – that means for our Part-Table which has 177 columns, it fires 177 times for each changed row.
E. g. when I changed 111 rows on the publication database in table Part, I got 19647 history rows on the subscriber database [DB_History].
All in all there are 177 (=columns in table Part) calls for each changed row. We think that’s the bottleneck. Why isn’t each row updated by one call of [MSmerge_upd_sp_xxx]?
The property "Multicolumn UPDATE" is set to "True" when I setup the replication. After that this option is shown as "False" and it
can’t be changed because it’s disabled.
Have someone any idea how to change this behavior?
On the subscriber, there are many calls like these:
First call by the Replication Merge Agent is:
exec
[dbo].[MSmerge_upd_sp_57E80269F8FF49205518DC22294346CB]'90F8EE6E-C0AE-E311-9403-005056842B7E',0x0E2C1000A0280000FEFFEF0F4B0B087E820D020EC10400000000000000000000,3,0x00,25,0x29435518DC2203000000FF,0x00,NULL,NULL,NULL,48,'1987-09-28
00:00:00',N'SI','2003-03-26
09:46:27',default,default,NULL,NULL,default,NULL,default,1.00000000,default,…,90
--2nd call by the Replication Merge Agent is:
exec
[dbo].[MSmerge_upd_sp_57E80269F8FF49205518DC22294346CB]'90F8EE6E-C0AE-E311-9403-005056842B7E',0x0001000000000000000000000000000000000000000000000000000000000000,2,0x29435518DC2203000000FF,25,0x29435518DC2203000000FF,0x00,default,default,default,default,default,default,default,N'CILINGIR',default,…,90
---3rd call is:
exec
[dbo].[MSmerge_upd_sp_57E80269F8FF49205518DC22294346CB]'90F8EE6E-C0AE-E311-9403-005056842B7E',0x0002000000000000000000000000000000000000000000000000000000000000,2,0x29435518DC2203000000FF,25,0x29435518DC2203000000FF,0x00,default,default,default,default,default,default,default,default,NULL,…,90
---…and so on…
---177th call is:
exec
[dbo].[MSmerge_upd_sp_57E80269F8FF49205518DC22294346CB]'90F8EE6E-C0AE-E311-9403-005056842B7E',0x0000000000000000000000000000000000000000000200000000000000000000,2,0x29435518DC2203000000FF,25,0x29435518DC2203000000FF,0x00,…,NULL,default,90