Wednesday, March 28, 2012
merge and managed auto id
full and must be updated by a replication agent."
my merge replication agent is constantly running and syncing.
why isn't it re-seeding the values in the ident. cols ?
You have blown your range on the subscriber. You need to select a range
which will not be blown between syncs. This is rather difficult to recover
from. Check out this article for more info.
http://www.simple-talk.com/sql/database-administration/the-identity-crisis-in-replication/
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
"Tony B." <Test@.spam.ca> wrote in message
news:u8XhNLnDHHA.3520@.TK2MSFTNGP04.phx.gbl...
> "The identity range managed by replication is
> full and must be updated by a replication agent."
> my merge replication agent is constantly running and syncing.
> why isn't it re-seeding the values in the ident. cols ?
>
Monday, March 26, 2012
merge Agent-login failure
running SQL Server 2005 on each, snapshot running ok, start merge agent and
get this.
Error messages:
The merge process could not connect to the Publisher 'XXUSSHU18UT:Process'.
Check to ensure that the server is running. (Source: MSSQL_REPL, Error
number: MSSQL_REPL-2147198719)
Get help: http://help/MSSQL_REPL-2147198719
The process could not connect to Publisher 'XXUSSHU18UT'. (Source:
MSSQL_REPL, Error number: MSSQL_REPL20084)
Get help: http://help/MSSQL_REPL20084
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (Source: MSSQLServer,
Error number: 18456)
Get help: http://help/18456
The easiest solution if you don't want to investigate the trust issue is to
switch the merge agent to be running under a SQL Server Login.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Hi,
I had similar problem few years ago when I was new to merge replication on
SQL Server 2000.
Create same windows account on both servers with same user name and same
password, run sql server end sql server agent on it and use this security
option for merge agent:
1. Run under SQL Server Agent service account
2. By impersonating the process account.
"bt7403" wrote:
> I have 2 servers running on workgroups; merge replication
> running SQL Server 2005 on each, snapshot running ok, start merge agent and
> get this.
> Error messages:
> The merge process could not connect to the Publisher 'XXUSSHU18UT:Process'.
> Check to ensure that the server is running. (Source: MSSQL_REPL, Error
> number: MSSQL_REPL-2147198719)
> Get help: http://help/MSSQL_REPL-2147198719
> The process could not connect to Publisher 'XXUSSHU18UT'. (Source:
> MSSQL_REPL, Error number: MSSQL_REPL20084)
> Get help: http://help/MSSQL_REPL20084
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (Source: MSSQLServer,
> Error number: 18456)
> Get help: http://help/18456
|||connect to the publisher in SQL Server Management Studio, expand the local
publication folder, expand your publication, right click on the Subscriber
and select properties. In the Security Agent process account section click
on the three ellipses and enter a windows account which has in the dbo role
on the publication database or is in the PAL.
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
"bt7403" <bt7403@.discussions.microsoft.com> wrote in message
news:717FD769-249F-40EC-9425-116738AA1740@.microsoft.com...
>I have 2 servers running on workgroups; merge replication
> running SQL Server 2005 on each, snapshot running ok, start merge agent
> and
> get this.
> Error messages:
> The merge process could not connect to the Publisher
> 'XXUSSHU18UT:Process'.
> Check to ensure that the server is running. (Source: MSSQL_REPL, Error
> number: MSSQL_REPL-2147198719)
> Get help: http://help/MSSQL_REPL-2147198719
> The process could not connect to Publisher 'XXUSSHU18UT'. (Source:
> MSSQL_REPL, Error number: MSSQL_REPL20084)
> Get help: http://help/MSSQL_REPL20084
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (Source:
> MSSQLServer,
> Error number: 18456)
> Get help: http://help/18456
|||Problem solved:
under SQL Security, I had to create a GUEST acct. and map this user to the
PUB db. Under Subscription Properties-Removed use of SQL Server Agent
service acct. and used Windows acct-maintained SQL Server Auth for Subscriber
connection.
Merge ran fine.
A side note:
Snapshot security settings do not require fine-tuning like Merge does.
I run this under SQL Server Agent service acct. and use SQL Server login for
connection to PUB.
thx. for your replies.
"Hilary Cotter" wrote:
> connect to the publisher in SQL Server Management Studio, expand the local
> publication folder, expand your publication, right click on the Subscriber
> and select properties. In the Security Agent process account section click
> on the three ellipses and enter a windows account which has in the dbo role
> on the publication database or is in the PAL.
> --
> 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
>
> "bt7403" <bt7403@.discussions.microsoft.com> wrote in message
> news:717FD769-249F-40EC-9425-116738AA1740@.microsoft.com...
>
>
sql
Merge Agent/
of info can i pull out form the merge agent/or where to get this info..say i
want to know how many deletes did i do in this replica before i decide to
sync...
is that possible programatically?
You can't, but you could query the publisher and subscriber for the number
of transactions at the max generation. You would query the tombstone and
contents tables to get this number.
Hilary
"Lottoman2000 NEWBE" <Lottoman2000NEWBE@.discussions.microsoft.com> wrote in
message news:1047463C-6853-499F-A879-B40FC4E648E4@.microsoft.com...
> If i want to inquire about the outstand transactions before i sync. what
> kind
> of info can i pull out form the merge agent/or where to get this info..say
> i
> want to know how many deletes did i do in this replica before i decide to
> sync...
> is that possible programatically?
>
|||Have a look at the procedure spBrowseMergeChanges on this page:
http://www.replicationanswers.com/Merge.asp
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Merge Agent takes all the CPU time
aplications. When I stope the Server Agent the Server becomes available to
other applications. I start the merge agent again and every thing works fine
.
How can I handle this so I wont have to stop the merge agent each time the
usrs start complaining?
Thanks a lot,
LinaHow often is your merge agent running..? Hourly ..?
Ideally you want to run the merge agent frequently, that way it has a small
amount of data to process and will have less impact on resources
HTH. Ryan
"Lina Manjarres" <LinaManjarres@.discussions.microsoft.com> wrote in message
news:956B2254-A621-4752-BFCD-1DF47151A269@.microsoft.com...
> The merge Agent takes all the CPU resources and makes no space for other
> aplications. When I stope the Server Agent the Server becomes available to
> other applications. I start the merge agent again and every thing works
> fine.
> How can I handle this so I wont have to stop the merge agent each time the
> usrs start complaining?
> Thanks a lot,
> Lina|||Hi Ryan
I have to schedules:
One continuos
and the other one each 5 minutes.
Thank you, Lina
"Ryan" wrote:
> How often is your merge agent running..? Hourly ..?
> Ideally you want to run the merge agent frequently, that way it has a smal
l
> amount of data to process and will have less impact on resources
> --
> HTH. Ryan
> "Lina Manjarres" <LinaManjarres@.discussions.microsoft.com> wrote in messag
e
> news:956B2254-A621-4752-BFCD-1DF47151A269@.microsoft.com...
>
>|||In that case i would suggest running a profiler trace to capture what stored
procedure the merge agent is running when the CPU spike occurs. You may find
it's related to the size of the metadata tables "MSmerge_contents,
MSmerge_genhistory" or the filtering conditions within the publication.
How to troubleshoot SQL Server merge replication problems :-
http://support.microsoft.com/?id=315521
HTH. Ryan
"Lina Manjarres" <LinaManjarres@.discussions.microsoft.com> wrote in message
news:6FD33C8B-468A-4DC4-860C-9E27ED644743@.microsoft.com...
> Hi Ryan
> I have to schedules:
> One continuos
> and the other one each 5 minutes.
> Thank you, Lina
> "Ryan" wrote:
>|||Thanks a lot
Lina
"Ryan" wrote:
> In that case i would suggest running a profiler trace to capture what stor
ed
> procedure the merge agent is running when the CPU spike occurs. You may fi
nd
> it's related to the size of the metadata tables "MSmerge_contents,
> MSmerge_genhistory" or the filtering conditions within the publication.
>
> How to troubleshoot SQL Server merge replication problems :-
> http://support.microsoft.com/?id=315521
>
> --
> HTH. Ryan
> "Lina Manjarres" <LinaManjarres@.discussions.microsoft.com> wrote in messag
e
> news:6FD33C8B-468A-4DC4-860C-9E27ED644743@.microsoft.com...
>
>
Merge Agent System Stored Procedures and sp_Recompile
Hello,
We are trying to be proactive and stop a potential performance issue by reducing the number of recompiles in our SQL 2000 database application. This database is replicated. After viewing output from Profiler and PerfMon it seems that over 90% of the recompiles are due to system stored procedures generated by replication merge agents. Can anything be done about this?
Thanks
Can you be more specific - which procs, and under what conditions?|||The databases are setup to use push merge replication with the polling interval set to every 15 seconds. It is replicating 4 databases to one subscriber. The procs that are involved are the ones generated by the merge agent when you set up replication. Hope this helps!|||Thanks Candice, but merge replication involves many many procs, including triggers. Can you please be more specific about which ones? And is this occuring at the publisher, or subscriber?merge agent status
I have a push merge subscription using Sql Server 2000. The publisher &
distributor reside on the same host.
I would like to be able for clients to determine the status of their merge
agent at the publisher. This would be used as a verification at the client,
that their merge agent is properly running and there is no error condition.
In the ReplicationMonitor/Merge Agent display, the status "No data needs to
be merged" displays when everything is functioning properly. I figure this
status must be available in some system table for the given merge agent.
Anyone know of the field / table to retrieve, in order to determine the
status of a merge agent? Is there some system sp to run?
Thanks in advance.
Regards,
bruce
its in the distribution database, query the run_status column on
MSmerge_history
"rr" <bruceradtke@.REMOVEspamREMOVE.earthlink.net> wrote in message
news:V8ebc.3251$WA4.2734@.twister.nyc.rr.com...
> Hello All -
> I have a push merge subscription using Sql Server 2000. The publisher &
> distributor reside on the same host.
> I would like to be able for clients to determine the status of their merge
> agent at the publisher. This would be used as a verification at the
client,
> that their merge agent is properly running and there is no error
condition.
> In the ReplicationMonitor/Merge Agent display, the status "No data needs
to
> be merged" displays when everything is functioning properly. I figure
this
> status must be available in some system table for the given merge agent.
> Anyone know of the field / table to retrieve, in order to determine the
> status of a merge agent? Is there some system sp to run?
>
> Thanks in advance.
> Regards,
> bruce
>
>
sql
Merge agent start failure
I have a problem with push merge subscription. The publisher/distributer
reside on same host with several clients connecting for merge replication.
The startup of one of the merge agents fails. The error message "Login
failed for user 'dbApp'. Reason: not associated with a trusted SQL server
connection. Error 18452".
I am able to connect to the client via QueryAnalyer using the 'dbApp' login.
I've done A/B checking with the security info for the bad client with a good
client and can not see any diffs.
I don't know what has happened. This client machine did work several weeks
ago. I suspect maybe some software installation munged the settings
somewhere but am at a loss as to where to check for this.
Any clues?
Thanks,
bruce
can you check the SQL error log for any information?
I have encountered intermittent memory problems of the form - could not
reserve contiguous memory blocks around the time I experienced these errors.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"rr" <bruceradtke@.REMOVEspamREMOVE.earthlink.net> wrote in message
news:N4fDd.37555$kq2.26384@.twister.nyc.rr.com...
> Hello All -
> I have a problem with push merge subscription. The publisher/distributer
> reside on same host with several clients connecting for merge replication.
> The startup of one of the merge agents fails. The error message "Login
> failed for user 'dbApp'. Reason: not associated with a trusted SQL server
> connection. Error 18452".
> I am able to connect to the client via QueryAnalyer using the 'dbApp'
login.
> I've done A/B checking with the security info for the bad client with a
good
> client and can not see any diffs.
> I don't know what has happened. This client machine did work several
weeks
> ago. I suspect maybe some software installation munged the settings
> somewhere but am at a loss as to where to check for this.
> Any clues?
> Thanks,
> bruce
>
>
merge agent slowing performance
I have setup merge replication with push subcription for every 10 min. I
have changed the agent profile to 'high Volume Server to server' but still
the duration and delivery rate remain almost the same. How can i increase the
delivery rate, or what should be the suggested agent profile be. Please help,
it is urget.
Thanks in Advance,
SVur
The history of the merge agent looks like this for hte last run:
# Actions : 32
Last action message: merged 3252 data changes(3209 inserts, 16 updates, 27
deletes)
Duration(secs): 00.00.43
Delivery rate (rows per sec): 73.0000
Inserts at Publisher:2912
Updates at Publisher:16
Deletes at publisher:27
conflicts at publisher:0
Inserts at subscriber:297
Updates at subscriber:0
Deletes at subscriber:0
conflicts at subscriber:0
Hi,
This is my merge agent history. the agent approximately took 9 min to merge
about 6500 changes in the last run. How can i improve the performance of the
merge agent? What are the implications of increasing the upload and download
batch size?
Thanks,
SVur
118/17/2004 8:20:18 AM8/17/2004 8:20:18 AM0Starting
agent.00000000000<Binary>1
118/17/2004 8:20:31 AM8/17/2004 8:20:31
AM0Initializing00000000000<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:20:31 AM0Connecting to Publisher
'01AL10015000025'00000000000<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:20:36 AM4Connecting to Subscriber
'01AL10015000026'00000000000<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:24 AM52Uploaded 104 data changes
(100 inserts, 0 updates, 4 deletes, 0
conflicts).18734200001000400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:24 AM52Uploaded 100 data changes
(100 inserts, 0 updates, 0 deletes, 0
conflicts).368903.92307692307600002000400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:26 AM55Uploaded 100 data changes
(100 inserts, 0 updates, 0 deletes, 0
conflicts).587185.52727272727200003000400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:29 AM57Uploaded 100 data changes
(100 inserts, 0 updates, 0 deletes, 0
conflicts).806247.08771929824500004000400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:47 AM76Uploaded 100 data changes
(100 inserts, 0 updates, 0 deletes, 0
conflicts).935936.63157894736800005000400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:51 AM80Uploaded 100 data changes
(100 inserts, 0 updates, 0 deletes, 0
conflicts).1079847.5500006000400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:54 AM82Uploaded 123 data changes
(123 inserts, 0 updates, 0 deletes, 0
conflicts).1247818.86585365853600007230400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:21:59 AM87Uploaded 104 data changes
(100 inserts, 4 updates, 0 deletes, 0
conflicts).1408599.55172413793100008234400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:11 AM99Uploaded 69 data changes
(69 inserts, 0 updates, 0 deletes, 0
conflicts).1408599.09090909090900008924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:14 AM102Downloaded 142 data
changes (0 inserts, 0 updates, 142 deletes, 0
conflicts).14151510.2156862745090014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:25 AM114Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14289010.017543859649100014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:26 AM115Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14406210.8200014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:27 AM116Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14520311.568965517241300014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:28 AM117Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14620312.324786324786400014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:42 AM130Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14726511.861538461538500014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:43 AM132Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14817112.439393939393600014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:45 AM133Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).14932713.097744360902700014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:46 AM134Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15012413.746268656716800014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:22:59 AM147Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15099913.210884353741900014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:00 AM149Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15198413.7046979865771000014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:01 AM149Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15295314.3758389261741100014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:01 AM150Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15381314.9466666666661200014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:11 AM160Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15471914.63751300014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:13 AM161Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15553115.1677018633541400014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:14 AM163Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15648515.5950920245391500014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:15 AM164Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15743816.109756097561600014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:26 AM175Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15822015.6685714285711700014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:27 AM175Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15898616.241800014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:28 AM176Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).15981416.7159090909091900014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:30 AM178Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16218917.0898876404492000014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:37 AM185Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16348616.9837837837832100014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:38 AM186Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16450217.4301075268812200014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:38 AM187Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16558017.871657754012300014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:39 AM187Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16650218.4064171122992400014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:52 AM200Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16725217.712500014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:53 AM201Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16809618.1194029850742600014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:54 AM203Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16895618.4334975369452700014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:23:55 AM204Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).16978418.8333333333332800014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:06 AM215Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17064318.334883720932900014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:07 AM215Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17137818.83000014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:08 AM217Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17242519.0875576036863100014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:09 AM217Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17341019.5483870967743200014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:22 AM230Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17445718.8782608695653300014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:23 AM231Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17555019.2294372294373400014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:23 AM232Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17664419.5775862068963500014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:24 AM232Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17762920.0086206896553600014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:32 AM240Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17847319.7583333333333700014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:33 AM241Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).17951920.0912863070533800014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:33 AM242Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).18041020.4214876033053900014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:34 AM242Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).18117620.8347107438014000014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:44 AM252Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).18258220.4047619047614100014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:44 AM252Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).18384820.8015873015874200014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:44 AM253Downloaded 115 data
changes (115 inserts, 0 updates, 0 deletes, 0
conflicts).18511421.1739130434784315014208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:45 AM253Downloaded 151 data
changes (100 inserts, 51 updates, 0 deletes, 0
conflicts).18634921.77075098814244155114208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:45 AM254Downloaded 100 data
changes (0 inserts, 100 updates, 0 deletes, 0
conflicts).18741122.07874015748441515114208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:46 AM255Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).18858222.38431372549451515114208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:46 AM255Downloaded 100 data
changes (99 inserts, 1 updates, 0 deletes, 0
conflicts).18972322.776470588235461415214208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:46 AM255Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).19091023.16862745098471415214208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:46 AM255Downloaded 100 data
changes (100 inserts, 0 updates, 0 deletes, 0
conflicts).19189423.560784313725481415214208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:48 AM256Downloaded 171 data
changes (170 inserts, 1 updates, 0 deletes, 0
conflicts).19278524.13671875498415314208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:48 AM256Downloaded 100 data
changes (98 inserts, 2 updates, 0 deletes, 0
conflicts).19373824.52734375508215514208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:48 AM257Downloaded 100 data
changes (99 inserts, 1 updates, 0 deletes, 0
conflicts).19475424.821011673151518115614208924400<Binary>0
138/17/2004 8:20:31 AM8/17/2004 8:24:49 AM257No data needed to be
merged.19475424.821011673151518115614208924400<Binary>0
128/17/2004 8:20:31 AM8/17/2004 8:24:49 AM257Merged 6379 data changes
(6073 inserts, 160 updates, 146 deletes, 0 resolved
conflicts).024.821011673151518115614208924400<Binary>1
"SVur" wrote:
> Hi,
> I have setup merge replication with push subcription for every 10 min. I
> have changed the agent profile to 'high Volume Server to server' but still
> the duration and delivery rate remain almost the same. How can i increase the
> delivery rate, or what should be the suggested agent profile be. Please help,
> it is urget.
> Thanks in Advance,
> SVur
> The history of the merge agent looks like this for hte last run:
> # Actions : 32
> Last action message: merged 3252 data changes(3209 inserts, 16 updates, 27
> deletes)
> Duration(secs): 00.00.43
> Delivery rate (rows per sec): 73.0000
> Inserts at Publisher:2912
> Updates at Publisher:16
> Deletes at publisher:27
> conflicts at publisher:0
> Inserts at subscriber:297
> Updates at subscriber:0
> Deletes at subscriber:0
> conflicts at subscriber:0
>
merge agent running a job on a different server.
audit database associated with this replicated database. After talking about
it we decided it would be better to have each subscriber database have a copy
of both the replication database and the audit database without setting up
the audit database for replication.
I’m trying to accomplish the following tasks.
1)After merging the data from the subscriber to the publisher the merge
agent would kick off a job to run a BCP command moving the audit data to txt
file. The audit triggers will have the not for replication attribute to
prevent firing these triggers when data is merged.
2)Truncate the subscriber’s server audit data.
3)Do a bulk insert onto the publisher servers audit database.
How can I kick off a job on the subscriber’s server when the merge agent
resides on the publisher’s server? I would really like this to all work off
of one job; I don’t want to create a scheduled job to run on each subscriber
to move this data. Any suggestions?
I’m also trying not to replicate this database, this is a heavily
distributed app and I’m trying to limit the amount of potential issues.
Thank you in advance.
Pauly C
Pauly,
why not use snapshot replication for this - it would seem to do exactly what
you reauire, and synchronization could be initiated at the publisher
immediately after the merge synchronization.
If you really don't want to use replication, then I'd still control the
system from the publisher. Using linked servers you could truncate the audit
table and transfer the table on each subscriber.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thank you once again for you help, I will check out both options.
Thank you,
Pauly C
"Paul Ibison" wrote:
> Pauly,
> why not use snapshot replication for this - it would seem to do exactly what
> you reauire, and synchronization could be initiated at the publisher
> immediately after the merge synchronization.
> If you really don't want to use replication, then I'd still control the
> system from the publisher. Using linked servers you could truncate the audit
> table and transfer the table on each subscriber.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
Merge Agent retrying forever
From time to time one or more subscribers can't reconnect to the Publisher. By inspecting their Merge Agents (through the Replication Monitor) in the Publisher Server we see that they are marked as retrying forever. In the distribution database MSmerge_hi
story table these agents have the "runstatus" column marked with 5 (retry).
We are not able to stop the agents. We have shut down the Publisher server but still the agents show the same status. We have noticed that in order to solve the problem we must synchronize those subscribers through UTP fast cables.
Any help will be appreciated
Righth click on the merge agent and click on Agent Properties. Click on the
Steps tab and double click on a step. On the Edit Step window, click on
the Advanced tab and change the number of retry attempts to a number other
than the default (usually 10 for the run Agent step and 0 for the other
two). I put 2 for all of my steps. You should also change the retry
interval, I put 1 for mine. Click apply and next to set the next step.
Hope this helps.
"Tony2000" <anonymous@.discussions.microsoft.com> wrote in message
news:F71724A8-457A-4B2F-BB8D-B92B0EC3ADD2@.microsoft.com...
> We have a Merge Replication with Publisher and Distributor on SQL Server
2000 SP3 and Subscribers running Personal SQL Server 2000 SP2 synchronizing
through VPN phone lines.
> From time to time one or more subscribers can't reconnect to the
Publisher. By inspecting their Merge Agents (through the Replication
Monitor) in the Publisher Server we see that they are marked as retrying
forever. In the distribution database MSmerge_history table these agents
have the "runstatus" column marked with 5 (retry).
> We are not able to stop the agents. We have shut down the Publisher server
but still the agents show the same status. We have noticed that in order to
solve the problem we must synchronize those subscribers through UTP fast
cables.
> Any help will be appreciated
sql
MErge agent replication
I have a problem with the Merge replication.
here, is the scienario :
We have 3 locations , A , B and C
there is a one way replication between A and B
one way replication between A and C
so all the data of B and C is uploaded to A.(exchange type
is 1)
Now the connection between A and B is maintained , it is
working , the merge agent status is successful and there
is no data needed to be merged.
whenever i try to make any modification in server B , it
is not replicated at all in Server A , and it keeps saying
no data needed to be merged and there is no error
message , but it is not uploading the data.
Any reason for that?
if somebody knows anything about that , i appreciate it
Thanks in advance
Dalia
Dalia,
can you check for the record in MSmerge_contents and also check for the
existence of the merge trigger on the subscriber table.
If the trigger exists and the record enters MSmerge_contents then check the
schedule of the merge agent.
HTH,
Paul Ibison
Merge agent properties
subscription on a remote server. We have a merge agent that is staying in the
retrying status. The intiial problem appears to be a query timeout, which
we've changed.
We can right click and see history and modify agent profiles. We can't,
however, stopr or start the agent or see the agent properties. We have
terminal serviced into the box.
Any ideas beyond recreating the subscription?
Is this subscriber from an ActiveX script or from Windows Synchronization
Manager? You can't modify the properties of agents from these subscriptions.
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
"Peter Feakins" <PeterFeakins@.discussions.microsoft.com> wrote in message
news:16A7F191-B74A-4A05-87E5-7A2AEB92620F@.microsoft.com...
> I'm trying to troubleshoot a merge replication with a single pull
> subscription on a remote server. We have a merge agent that is staying in
the
> retrying status. The intiial problem appears to be a query timeout, which
> we've changed.
> We can right click and see history and modify agent profiles. We can't,
> however, stopr or start the agent or see the agent properties. We have
> terminal serviced into the box.
> Any ideas beyond recreating the subscription?
Merge Agent Profile settings
less reliable links. Under SQL2000 I could set MaxDownloadChanges in the
agent profile to 1500, but in SQL2005 this value is limited to 300 max.
Has anybody run into this issue before? Why was it changed from SQL2000
to SQL2005?
The parameters are defined in msdb..MSagentparameterlist. I am
considering changing the record to allow a different maximum. Would this
be an issue?
I have no idea why it was changed but you should be able to override the
profile settings in the agent properties.
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
"JE" <jgegroups.spam@.gmail.nospam.com> wrote in message
news:uqaHGxtaHHA.1296@.TK2MSFTNGP02.phx.gbl...
>I am trying to limit the downloaded records per merge session over my less
>reliable links. Under SQL2000 I could set MaxDownloadChanges in the agent
>profile to 1500, but in SQL2005 this value is limited to 300 max. Has
>anybody run into this issue before? Why was it changed from SQL2000 to
>SQL2005?
> The parameters are defined in msdb..MSagentparameterlist. I am considering
> changing the record to allow a different maximum. Would this be an issue?
|||When I try to override it I am not allowed to enter a value higher than
300. In SQL2000 I was able to enter any value, but in SQL2005 it limits
me to 300.
Hilary Cotter wrote:
> I have no idea why it was changed but you should be able to override the
> profile settings in the agent properties.
>
|||Open up replication monitor, locate your publication, locate your
publication (click on it), right click and select view details, click on
Action, Merge Agent Job Properties, and select Steps, run agent, and click
edit, click in the command box, and hit end, then type -MaxDownloadChanges
100
Close the dialog and restart your agent.
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
"JE" <jgegroups.spam@.gmail.nospam.com> wrote in message
news:45FFC69D.2030108@.gmail.nospam.com...[vbcol=seagreen]
> When I try to override it I am not allowed to enter a value higher than
> 300. In SQL2000 I was able to enter any value, but in SQL2005 it limits me
> to 300.
> Hilary Cotter wrote:
|||I see, so adding the parameter directly to the merge agent job will
override the value specified in the default merge agent profile and also
allow me to set it to whatever I need.
I wonder if Microsoft can tell us why they limit the MaxDownloadChanges
to 300 in the agent profile properties dialog.
Hilary Cotter wrote:
> Open up replication monitor, locate your publication, locate your
> publication (click on it), right click and select view details, click on
> Action, Merge Agent Job Properties, and select Steps, run agent, and click
> edit, click in the command box, and hit end, then type -MaxDownloadChanges
> 100
> Close the dialog and restart your agent.
>
|||Yes, it will override the profile setting. I don't know why the default
setting in the profile is 300. The default is everything, with a minimum of
100 (should there be over 100 changes to be downloaded).
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
"JE" <jgegroups.spam@.gmail.nospam.com> wrote in message
news:45FFDF85.7030807@.gmail.nospam.com...[vbcol=seagreen]
>I see, so adding the parameter directly to the merge agent job will
>override the value specified in the default merge agent profile and also
>allow me to set it to whatever I need.
> I wonder if Microsoft can tell us why they limit the MaxDownloadChanges to
> 300 in the agent profile properties dialog.
> Hilary Cotter wrote:
Merge Agent Profile downloadreadchangesperbatch
bug where the merge agent quadruples the value stored in the
downloadreadchangesperbatch?
Evidence of this is seen by capturing calls to the procedure shown below
where the first paramter is the number of rows to select. This specific
example occurs when the downloadreadchangesperbatch = 50.
exec sp_MSenumpartialchanges 200, N'#belong_agent_409150406', 2205125,
'1A842C8F-EDD2-4853-9BA4-979BBDF31ADE', 'DE4291F8-D4AE-48FC-A120-486818DFE5A9'
Forgot to mention SP3a @.@.VERSION = 8.00.760 on both publisher and subscriber
running development edition.
"Brian Reuter" wrote:
> If a MS represenative monitors this group, I am curious if there is a known
> bug where the merge agent quadruples the value stored in the
> downloadreadchangesperbatch?
> Evidence of this is seen by capturing calls to the procedure shown below
> where the first paramter is the number of rows to select. This specific
> example occurs when the downloadreadchangesperbatch = 50.
>
> exec sp_MSenumpartialchanges 200, N'#belong_agent_409150406', 2205125,
> '1A842C8F-EDD2-4853-9BA4-979BBDF31ADE', 'DE4291F8-D4AE-48FC-A120-486818DFE5A9'
>
merge agent not started - Start Synchronizing disabled
i'm trying to setup a merge replication between the default istance and a named one of the same machine, using the same domain account for both publisher and subscriber.
when it comes to "start synchronizing" (right click on the subscriber merge agent), i found it disabled, just like it is running, but it is not (the icon shows a stop sign, even refreshing.)
The state is "disactivated". When i stop sync and start it again things don't change.
If i setup a "pull" subscription, i get a sequence of a message like "interface not supported" (a translation from italian "Interfaccia non supportata"): after 10 attempts, it stops.
i cannot find this error searching in internet, could you address me?
thanks in advance!How did you set up replication, using scripts or Wizards?|||i used wizards.
i noticed a difference: while in this SQL Server installation the replication won't start at all, it works seamlessly on the SQL Server installed in the domain server.
Maybe it's a matter of DNS.sql
Merge agent login problem
I have a push merge replication up and working in development SQL Server 2005 (publisher) and SQL Express (subscriber). Because the upgrade from 2000 to 2005 for our production servers has been delayed for who knows how long, I am working to set the same replication up with 2000 and MSDE.
The merge agent is failing in 2000 with the error:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (Source: MSSQLServer, Error number: 18452)
The 2005 merge agent runs fine. I think it is because the 2005 subscription wizard allowed me to set the 'Run as: SQL Agent Service Account' option, instead of a windows authentication uid. There is no opportunity to set this in the 2000 subscription wizard nor on the merge agen job step itself. I didn't take a screen dump, but am confident that I used the SECURITYMODE=SQL parameter on the MSDE client install.
Any help on whether I'm correct on what the problem is and what to change to get the 2000 merge to log in with the SQL agent service account would be great. Thanks.
Is the SQL agent service account a windows account? If so, then you have to change the subscriber machine to allow windows authentication. SECURITYMODE=SQL means only sql server logins can connect. You should be able to use Enterprise Manager to change the subscriber's server properties to allow both SQL and Windows authentication mode.|||The install document with MSDE 2000 says that SECURITYMODE=SQL enables mixed mode. The server shows Windows and SQL authentication enabled.
I've looked at the replication jobs with both Enterpise Manager and Management Studio and cannot see how and what the merge is trying to log in to the client with, except for the difference noted in my original post.
I also noticed that the program sqlmangr.exe fails when the MSDE PC is started. It seems to operate ok except for the merge connection, though.
|||The difference appears to be that 2005 can impersonate the service account and 2000 cannot. I added the publication server service account as a user with the same password on the subscription machine and the merge agent was able to log in.Merge Agent is reporting deadlocks
have done a SQL Profiler trace which isn't picking up the Deadlock. The
subscription type is pull and there are more than 12 merge agents on the
Publisher
The process could not enumerate changes at the 'Publisher'.
Percent Complete: 0
The process could not enumerate changes at the 'Publisher'.
Repl Agent Status: 5
Percent Complete: 0
Category:NULL
Source: Merge Replication Provider
Number: -2147200999
Message: The process could not enumerate changes at the 'Publisher'.
Repl Agent Status: 3
Percent Complete: 0
Category:SQLSERVER
Source: SQLBDG01PA
Number: 1205
Message: Transaction (Process ID 94) was deadlocked on lock resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction.
Repl Agent Status: 3
Disconnecting from Publisher 'SQLBDG01PA'
Disconnecting from Subscriber 'EBIVCSA'
Disconnecting from Publisher 'SQLBDG01PA'
Disconnecting from Publisher 'SQLBDG01PA'
Disconnecting from Publisher 'SQLBDG01PA'
Disconnecting from Publisher 'SQLBDG01PA'
Disconnecting from Subscriber 'EBIVCSA'
Disconnecting from Subscriber 'EBIVCSA'
Disconnecting from Subscriber 'EBIVCSA'
Disconnecting from Subscriber 'EBIVCSA'
Disconnecting from Publisher 'SQLBDG01PA'
Disconnecting from Distributor 'SQLBDG01PA'
Hello,
You may want to enable 1204, 3605 and 1205 flag to see more information
about this deadlock:
The following article is for your reference:
832524 SQL Server technical bulletin - How to resolve a deadlock
http://support.microsoft.com/?id=832524
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>Thread-Topic: Merge Agent is reporting deadlocks
>thread-index: AcYE+kfsejv9d52cQuKGAjAGyxI8Wg==
>X-WBNR-Posting-Host: 159.99.4.20
>From: =?Utf-8?B?U3lkbmV5?= <hsc@.newsgroup.nospam>
>Subject: Merge Agent is reporting deadlocks
>Date: Mon, 19 Dec 2005 16:14:02 -0800
>Lines: 36
>Message-ID: <1CF81079-5E0F-46A6-8C0C-2FFE03906D20@.microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.sqlserver.replication
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.replication:67673
>X-Tomcat-NG: microsoft.public.sqlserver.replication
>Can anyone tell me what could be causing the following deadlock issues? I
>have done a SQL Profiler trace which isn't picking up the Deadlock. The
>subscription type is pull and there are more than 12 merge agents on the
>Publisher
>The process could not enumerate changes at the 'Publisher'.
>Percent Complete: 0
>The process could not enumerate changes at the 'Publisher'.
>Repl Agent Status: 5
>Percent Complete: 0
>Category:NULL
>Source: Merge Replication Provider
>Number: -2147200999
>Message: The process could not enumerate changes at the 'Publisher'.
>Repl Agent Status: 3
>Percent Complete: 0
>Category:SQLSERVER
>Source: SQLBDG01PA
>Number: 1205
>Message: Transaction (Process ID 94) was deadlocked on lock resources with
>another process and has been chosen as the deadlock victim. Rerun the
>transaction.
>Repl Agent Status: 3
>Disconnecting from Publisher 'SQLBDG01PA'
>Disconnecting from Subscriber 'EBIVCSA'
>Disconnecting from Publisher 'SQLBDG01PA'
>Disconnecting from Publisher 'SQLBDG01PA'
>Disconnecting from Publisher 'SQLBDG01PA'
>Disconnecting from Publisher 'SQLBDG01PA'
>Disconnecting from Subscriber 'EBIVCSA'
>Disconnecting from Subscriber 'EBIVCSA'
>Disconnecting from Subscriber 'EBIVCSA'
>Disconnecting from Subscriber 'EBIVCSA'
>Disconnecting from Publisher 'SQLBDG01PA'
>Disconnecting from Distributor 'SQLBDG01PA'
>
|||Thank you for that information Peter,
It helped me isolate where the deadlock is. Below is the output from the log
which shows that the deadlock is occurring in some SQL stored procedures. An
update is being done on one of our tables nad this is where it occurrs. This
is a major problem for us as the site we are supporting cannot synchronise
their servers at all. There are 12 servers to synchronise but only 8 can be
done and then they all start to fail one at a time. If anyone has any other
information about how to get around this problem it would be greatly
appreciated.
Node:1
KEY: 9:1977058079:7 (ee0128400385) CleanCnt:1 Mode: U Flags: 0x0
Grant List 0::
Owner:0x42bdf5c0 Mode: S Flg:0x0 Ref:0 Life:00000001 SPID:147 ECID:0
SPID: 147 ECID: 0 Statement Type: SELECT Line #: 23
Input Buf: RPC Event: sp_MSenumchanges;1
Requested By:
ResType:LockOwner Stype:'OR' Mode: X SPID:101 ECID:0 Ec

Value:0x51ad0560 Cost

Node:2
KEY: 9:1977058079:1 (95002952f11f) CleanCnt:1 Mode: X Flags: 0x0
Grant List 0::
Owner:0x5a33bdc0 Mode: X Flg:0x0 Ref:2 Life:02000000 SPID:101 ECID:0
SPID: 101 ECID: 0 Statement Type: UPDATE Line #: 935
Input Buf: RPC Event: sp_upd_BE8D5D46BE0642C56A093B6C6808492A;1
Requested By:
ResType:LockOwner Stype:'OR' Mode: S SPID:147 ECID:0 Ec

Value:0x42bdc420 Cost

Victim Resource Owner:
ResType:LockOwner Stype:'OR' Mode: S SPID:147 ECID:0 Ec

Value:0x42bdc420 Cost

End deadlock search 485 ... a deadlock was found.
"Peter Yang [MSFT]" wrote:
> Hello,
> You may want to enable 1204, 3605 and 1205 flag to see more information
> about this deadlock:
> The following article is for your reference:
> 832524 SQL Server technical bulletin - How to resolve a deadlock
> http://support.microsoft.com/?id=832524
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ================================================== ===
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --
>
|||Hello,
Based on my research, the new SQL Server build 818 changed how the Merge
Agent locks records on the Publisher while it is synchronizing changes to
the subscriber. This new design change might cause the Merge Agent to
Deadlock with the Update from the application. We discovered we can "tune"
the Merge agent to lock a smaller number of records and hopefully avoid the
deadlocking.
The SQL Server help topic below describe how to create a new Merge Agent
Profile. In the new profile change the DownloadReadChangesPerBatch setting
from the default
setting of 100 to 25. This will lock a smaller number of records per batch
while synchronizing. We believe 25 is a good compromise but it may need to
be adjusted.
See SQL Server Help Topics:
- Merge Agent Profile
- How to create a replication agent profile (Enterprise Manager)
Another the work around is to run the Merge Agent every minute instead of
continuously so when it fails with a deadlock, the Agent will automatically
restart.
Please rest assured this issue has been routed to the proper channel. If
there is any update on this, we will let you know. However, it may take
some time and we appreciate your patience.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>Thread-Topic: Merge Agent is reporting deadlocks
>thread-index: AcYGeQ48jpTy5VEoQhSZsrR+3H87vw==
>X-WBNR-Posting-Host: 159.99.4.20
>From: =?Utf-8?B?U3lkbmV5?= <hsc@.newsgroup.nospam>
>References: <1CF81079-5E0F-46A6-8C0C-2FFE03906D20@.microsoft.com>
<VdGdTKTBGHA.1236@.TK2MSFTNGXA02.phx.gbl>
>Subject: RE: Merge Agent is reporting deadlocks
>Date: Wed, 21 Dec 2005 13:54:02 -0800
>Lines: 127
>Message-ID: <EED67217-642D-4E1C-808D-E4E51CD66D2C@.microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.sqlserver.replication
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.replication:67722
>X-Tomcat-NG: microsoft.public.sqlserver.replication
>Thank you for that information Peter,
>It helped me isolate where the deadlock is. Below is the output from the
log
>which shows that the deadlock is occurring in some SQL stored procedures.
An
>update is being done on one of our tables nad this is where it occurrs.
This
>is a major problem for us as the site we are supporting cannot
synchronise
>their servers at all. There are 12 servers to synchronise but only 8 can
be
>done and then they all start to fail one at a time. If anyone has any
other
>information about how to get around this problem it would be greatly
>appreciated.
>Node:1
>KEY: 9:1977058079:7 (ee0128400385) CleanCnt:1 Mode: U Flags: 0x0
> Grant List 0::
> Owner:0x42bdf5c0 Mode: S Flg:0x0 Ref:0 Life:00000001 SPID:147
ECID:0
> SPID: 147 ECID: 0 Statement Type: SELECT Line #: 23
> Input Buf: RPC Event: sp_MSenumchanges;1
> Requested By:
> ResType:LockOwner Stype:'OR' Mode: X SPID:101 ECID:0 Ec

>Value:0x51ad0560 Cost

>Node:2
>KEY: 9:1977058079:1 (95002952f11f) CleanCnt:1 Mode: X Flags: 0x0
> Grant List 0::
> Owner:0x5a33bdc0 Mode: X Flg:0x0 Ref:2 Life:02000000 SPID:101
ECID:0[vbcol=seagreen]
> SPID: 101 ECID: 0 Statement Type: UPDATE Line #: 935
> Input Buf: RPC Event: sp_upd_BE8D5D46BE0642C56A093B6C6808492A;1
> Requested By:
> ResType:LockOwner Stype:'OR' Mode: S SPID:147 ECID:0 Ec

>Value:0x42bdc420 Cost

>Victim Resource Owner:
> ResType:LockOwner Stype:'OR' Mode: S SPID:147 ECID:0 Ec

>Value:0x42bdc420 Cost

>End deadlock search 485 ... a deadlock was found.
>
>"Peter Yang [MSFT]" wrote:
rights.[vbcol=seagreen]
I[vbcol=seagreen]
the[vbcol=seagreen]
with
>
Merge Agent Hangs (reporting no errors)
In my merge replication scenario I use Push subscriptions. The
distributor is SQL server 2000 Sp3a, and subscribers are MSDE SP3a.
Everything works fine but recently merge agents started to "hang"
reporting no errors at random phases of replication session. They stop
sending or receiving any data between distributor and subscriber
(there is no network traffic). SQL Profiles show no activity on a
subscriber server. Last message generated by agent is "The process is
running and is waiting for a response from one of the backend
connections".
If there is a problem with communication between servers one would
expect returnig an error code and retrying operation. In my case the
merge agent "hangs" and waits for nothing. After 1 or 2 hours it
reports a communication link failure (waits for a random period of
time).
To continue a Merge process I have to Stop and Start the merge agent
manually.
Since my replication sends a lot of data from subscribers
(MSMerge_genhistory has approx 50000 entries when retention period is
set to 2 days.) after uploading data changes to the publisher (the
procedure sp_MScheckexistsgeneration is executed for every one of
50000 generations - am I right about this?) it takes a long time (40
minutes) to complete. If merge agent hangs, the process must be run
from the beginning. In this situation it is almost impossible to
complete the replication session.
What can be the cause of such behavior of merge agents?
Last lines of output (level 3) generated by agent are as follows:
{call sp_MScheckexistsgeneration (?, ?) }
{call sp_MScheckexistsgeneration (?, ?) }
Percent Complete: 0
The process is running and is waiting for a response from one of the
backend connections.
Repl Agent Status: 3
Tomek
Tomek,
it's difficult to say, but in some sense this looks like a connectivity
issue. However, when I've seen such a situation before, the error was
'General network error'. You might like to verify is this is/is not the
case, by using a Network Monitor tool:
http://support.microsoft.com/default...48942&sd=tech.
Alternatively you could open a window in QA on the publisher, with the
window connected to the subscriber SQL Server. In the window do a simple
select command in a loop and return the date. This should tell you if/when
the connectivity had problems.
Can you check in current activity or sp_who2/sp_lock/sp_blocker to identify
if there is any blocking involved. If the problem is not connectivity then
this would be my next test.
I'd also like to know what happens when you restart the agent - does it work
quickly or still take a long time but is successful.
No doubt you have considered this, but if possible can you synchronize more
often to shorten the batchsize?
You might also optimize performance by running
sp_mergemetadataretentioncleanup manually and optimize
he -DownloadGenerationsPerBatch parameter.
HTH,
Paul Ibison
|||Paul,
Thank you for your response. I hope my answers to your questions will
help us to solve the problem.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:<#EzzqyDQEHA.1312@.TK2MSFTNGP12.phx.gbl>...
> it's difficult to say, but in some sense this looks like a connectivity
> issue. However, when I've seen such a situation before, the error was
> 'General network error'. You might like to verify is this is/is not the
> case, by using a Network Monitor tool:
> http://support.microsoft.com/default...48942&sd=tech.
It can be related to connectivity because merge agents connect to
subscribers that not always use reliable network connection. But the
problem is that instead of reporting General network error and
retrying operation agent waits (hangs) doing nothing.
> Alternatively you could open a window in QA on the publisher, with the
> window connected to the subscriber SQL Server. In the window do a simple
> select command in a loop and return the date. This should tell you if/when
> the connectivity had problems.
QA in loop worked fine (no connectivity problems), but in the same
time agent assigned to the same subscriber hanged.
> Can you check in current activity or sp_who2/sp_lock/sp_blocker to identify
> if there is any blocking involved. If the problem is not connectivity then
> this would be my next test.
I've checked this ne too. Blocking is not the reason.
> I'd also like to know what happens when you restart the agent - does it work
> quickly or still take a long time but is successful.
I will describe how my agent works. Please tell me is it correct
behavior.
1) After connecting to subscriber agent uploads all the data changes
made by subscriber to the publisher. This works very fast and i do not
see any problem here (agent has never stopped at this phase).
2) Merge agent executes sp_MScheckexistsgeneration for each of 50000
generations stored in msmerge_genhistory at subscriber side. If there
is some data to download, it is downloaded to subscriber, and then
merge agent checks next generation.
Now let's assume that merge agent "hanged" ot generation 39000. After
restarting the agent it starts the process from the beginning checking
each of 39000 generations that where checked and merged in previus
session.
The merge agent is succesfull only if it is able to go through 50000
generations without loosing connection to subscriber. That is wy it is
so difficult to complete merge session.
IMHO the merge agent should start from generation 39000 making
completing session possible even on not reliable connections. Is it
"by design" behaviour?
> No doubt you have considered this, but if possible can you synchronize more
> often to shorten the batchsize?
It is not possible. subscribers can not synchronize on saturday and
sunday. So 2 days retention perod is minumum.
> You might also optimize performance by running
> sp_mergemetadataretentioncleanup manually and optimize
> he -DownloadGenerationsPerBatch parameter.
I think the problem is not metadata at publisher but metadata at
subscribers. It is not deleted after succesfull replication session (i
think it must work this way).
DownloadGenerationsPerBatch does not help because most of the time
merge agent executes sp_MScheckexistsgeneration without downloading
any data changes. Or maybe I am misunderstanding this parameter?.
Tomek
|||Tomek,
Slow and unreliable connections can result in more retries by the Merge
Agent, none of which you've seen. Your QA test also indicates the same
thing, so we can cross this off the list.
Answers inline...
> IMHO the merge agent should start from generation 39000 making
> completing session possible even on not reliable connections. Is it
> "by design" behaviour?
>
I guess it is not processed this way to try to avoid potential
non-convergence as inserts and child records could be in separate batches
(http://support.microsoft.com/default...b;enus;Q308266)
>
Having MetadataRetentionCleanup 1 should sort this out, but you could run
manually sp_mergemetadataretentioncleanup on the publisher and subscriber to
see if things are improved. It won't remove the 50000 entries, but what I am
hoping is that the search for new generations will be noticeably quicker
after old ones are removed.
> DownloadGenerationsPerBatch does not help because most of the time
> merge agent executes sp_MScheckexistsgeneration without downloading
> any data changes. Or maybe I am misunderstanding this parameter?.
Increasing the -DownloadGenerationsPerBatch Merge Agent parameters (even to
its maximum value of 2000) is a recommendation where a Subscriber has not
merged data with the Publisher for an extended period time, during which the
Publisher or other Subscribers have made numerous changes
(http://www.microsoft.com/technet/pro...n/mergperf.msp
x). So, I'd definitley test altering this parameter's value.
(Powodzenia)
Paul
Merge agent failure; Urgent
We have a publisher and 2 subsribers. The subscribers are spanning 2
transactions/sec. We have inplemented merge replication and it was
scheduled to occur every 5 min. When we start the replication, the
replications is going on without any problem for sometime(may be some
hours), but after that it fails with the message, "the process could
not deliver inserts at the publisher". That too we have 3 articles to
replicate. The first article is replicating fine.But the second article
fails with this error message "the process could not deliver inserts at
the publisher".We have SAN. When I searched for this error in google,
it asked me to increase the queytimeout value in agent profile. So I
increased it from 300 to 600, but in vain. If anybody could help me in
this, that would be great.
Thanks,
Preethi.
Preethi,
perhaps you could further increase the timeout? I'd also implement logging
(http://support.microsoft.com/?id=312292). After that, have a look at the
spid using dbcc inputbuffer to see what is happening on synchronization. You
might also want to run sp_who2 to look for any blocking occurring.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
sql
merge agent failure after IP changed
Today I changed the gateway and DNS info.; re-ran merge agent and got this
error.
Error messages:
The merge process could not connect to the Publisher 'XXUSSHU18UT:Process'.
Check to ensure that the server is running. (Source: MSSQL_REPL, Error
number: MSSQL_REPL-2147198719)
Get help: http://help/MSSQL_REPL-2147198719
The process could not connect to Publisher 'XXUSSHU18UT'. (Source:
MSSQL_REPL, Error number: MSSQL_REPL20084)
Get help: http://help/MSSQL_REPL20084
Unable to complete login process due to delay in opening server connection
(Source: MSSQLServer, Error number: 0)
Get help: http://help/0
After I changed the IP info. (put back original Gateway IP) the merge agent
ran successful.
What/where do these changes get applied that would alter merge agent from
running?
BTW, I also removed the gateway completely on Cleint A and the merge agent
continued to run successfully again. However I do need the new gateway (the
one that is not working for merge).
thx..
This seems to be a name resolution problem. Can you reboot, or do a
ipconfig /flushdns
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
"bt7403" <bt7403@.discussions.microsoft.com> wrote in message
news:4586BD18-D056-4E79-96C9-8B4167C9528F@.microsoft.com...
>I setup merge replication yesterday on Client A and was successful.
> Today I changed the gateway and DNS info.; re-ran merge agent and got this
> error.
> Error messages:
> The merge process could not connect to the Publisher
> 'XXUSSHU18UT:Process'.
> Check to ensure that the server is running. (Source: MSSQL_REPL, Error
> number: MSSQL_REPL-2147198719)
> Get help: http://help/MSSQL_REPL-2147198719
> The process could not connect to Publisher 'XXUSSHU18UT'. (Source:
> MSSQL_REPL, Error number: MSSQL_REPL20084)
> Get help: http://help/MSSQL_REPL20084
> Unable to complete login process due to delay in opening server connection
> (Source: MSSQLServer, Error number: 0)
> Get help: http://help/0
> After I changed the IP info. (put back original Gateway IP) the merge
> agent
> ran successful.
> What/where do these changes get applied that would alter merge agent from
> running?
> BTW, I also removed the gateway completely on Cleint A and the merge agent
> continued to run successfully again. However I do need the new gateway
> (the
> one that is not working for merge).
>
> thx..
>