SQLMerge creates orphaned processes if terminated abnormally

SQLMerge creates orphaned processes if terminated abnormally

Post by R Bake » Thu, 01 Feb 2001 01:12:22



I've noticed in debugging a replication implementation that use of the
SQLMerge object creates orphaned processes (which prevent subsequent
synchronization until explicitly terminated) if the application that starts
the merge process terminates abnormally (e.g. like stopping it in the
de*).

Once this happens, I can't synchronize again until I explicitly kill the
processes on the publisher/distributor. I see messages from the SQLMerge
object like:

"The merge process could not initialize the Publisher
'ECRIBMASTER2:Sample45'."
"{call master..sp_MScheck_agent_instance
(N'2BC53FAA-C0AA-436A-BBCA-6799E5FBFC0A', 4)}"
"Another merge agent for the subscription(s) is running."

Is there a way to prevent this from happening. The processes do not seem to
be cleaned up within any reasonable amount of time (e.g. even overnight),
and the replication monitor keeps showing the agent in a "retry" state until
I kill the process, even though the subscriber that started the merge
process is long gone.

Thanks,

Randy

 
 
 

SQLMerge creates orphaned processes if terminated abnormally

Post by Chris Lesli » Thu, 15 Feb 2001 12:45:34


Hi
I had a reply from MS Support for the exact same issue and they say, that is how
it works.... Because the agent runs server side, if the client is disconnected
the process continues to run(why the server side cannot detect a disconnect I do
not know), and the proceses are orphaned.

Chris

Quote:-----Original Message-----

I've noticed in debugging a replication implementation that use of the
SQLMerge object creates orphaned processes (which prevent subsequent
synchronization until explicitly terminated) if the application that starts
the merge process terminates abnormally (e.g. like stopping it in the
de*).

Once this happens, I can't synchronize again until I explicitly kill the
processes on the publisher/distributor. I see messages from the SQLMerge
object like:

"The merge process could not initialize the Publisher
'ECRIBMASTER2:Sample45'."
"{call master..sp_MScheck_agent_instance
(N'2BC53FAA-C0AA-436A-BBCA-6799E5FBFC0A', 4)}"
"Another merge agent for the subscription(s) is running."

Is there a way to prevent this from happening. The processes do not seem to
be cleaned up within any reasonable amount of time (e.g. even overnight),
and the replication monitor keeps showing the agent in a "retry" state until
I kill the process, even though the subscriber that started the merge
process is long gone.

Thanks,

Randy

.


 
 
 

SQLMerge creates orphaned processes if terminated abnormally

Post by Jordan Bownes » Wed, 21 Mar 2001 09:38:22


I had the same problem. You can kill the process for the Merge Agent on the server if you know its SPID. You can get this from the GUID returned by the error message. Here's what I did (in VB):

============================

rsSPID.Open "select spid from master..sysprocesses where program_name = '" & strMergeGUID & "'"

cnn.Execute "Kill " & rsSPID!spid

============================

** The GUID is the long string in the error message, in this case 2BC53FAA-C0AA-436A-BBCA-6799E5FBFC0A ...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

SQLMerge creates orphaned processes if terminated abnormally

Post by Doug Bernhard » Fri, 23 Mar 2001 00:11:24


Under SQL2K we fixed this by adjusting the KeepAliveTime in the tcpip
parameters  This will then detect and drop those processes much faster.

Quote:

> I had the same problem. You can kill the process for the Merge Agent on

the server if you know its SPID. You can get this from the GUID returned by
the error message. Here's what I did (in VB):
Quote:

> ============================

> rsSPID.Open "select spid from master..sysprocesses where program_name = '"

& strMergeGUID & "'"
Quote:

> cnn.Execute "Kill " & rsSPID!spid

> ============================

> ** The GUID is the long string in the error message, in this case

2BC53FAA-C0AA-436A-BBCA-6799E5FBFC0A ...
Quote:

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!