Cannot stop service in Windows 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear All,
There is a service written in Delphi 5. It uses ADO and msxml. However,
this service cannot be stopped in windows 2000 (Server Pack 2) and responded
with exception message.

Any remedy?
Thanks.
 
Geossl said:
Dear All,
There is a service written in Delphi 5. It uses ADO and msxml. However,
this service cannot be stopped in windows 2000 (Server Pack 2) and
responded
with exception message.

Any remedy?
Thanks.

I don't think it being Delphi is significant. You will get this behaviour
with any badly written service, regardless of the language it is written in.

If the process won't respond gracefully, you may still be able to kill the
process. If you can identify in task manager the process that the service is
using then try killing it (from task manager). If that doesn't work then try
downloading pskill from systeminternals
(http://www.sysinternals.com/Utilities/PsKill.html) and use that to try
killing the process.

I had a similar problem with a Microsoft Exchange process earlier this year,
and pskill (or a reboot) was the only way to shut it down. (This was in
response to a DOS attack on our server, the process was otherwise quite
reliable and well behaved.)

You said it uses ADO, if its talking to an Access database then it would be
worth checking the database after you've killed the process. I was
developing a utility which spent most of its time updating an access
database and if it crashed (which it did before I found the cause) then it
could corrupt the database. Just a warning. Unlikely to be a problem if its
talking to SQL Server, Oracle or MySQL.

Hope this helps.
 
Thanks Brian.

But I have trapped the stop service event and there is no problem. The
exception seemed to be raised after the event is completed. Besides, I have
freed all the resource already......
 
Geossl said:
Thanks Brian.

But I have trapped the stop service event and there is no problem. The
exception seemed to be raised after the event is completed. Besides, I
have
freed all the resource already......

I must have misunderstood, from your original posting I thought you couldn't
stop the process. This doesn't sound to me like a windows issue, but an
issue with the service. If it stops and then generates an exception, then it
must be a problem with the service. You (or the original developer) will
need to go back to the Delphi code to determine why it is generating an
exception. (It sounds like an object is being accessed after it has been
freed.)
 
Hi Brian,

There is exception but the service cannot be stop also. And it is a
production machine, it seems not suitable to run other utility program to
stop it .
 
Back
Top