|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem with proc.kill()My case is, i am trying to kill a process (SQLPLUS process) in my Win. Service, when either the Service is stopped or when my app exe is killed from the Task Manager. The problem is, when i kill the SQL process, its not getting killed, and its running and running. I find this in both the cases of stopping the service and killing the exe. What can i do to kill the process, because killing SQLPLUS is critical; and because of this problem, two SQLPLUS processes are overlapping with each other, when the next time i start the exe/service. Thus, my output file, where actually i spool data (using SQLPLUS) becomes inconsistent and this is bad. I couldn't find any alternative to proc.kill() [which shd. actually kill the process immediately] Can any of u help me out in this ASAP?? cu.4m.srini***@gmail.com wrote:
Show quote > Hi, You question is a little ambiguous, but I am assuming by SQL process> > My case is, i am trying to kill a process (SQLPLUS process) in my Win. > Service, when either the Service is stopped or when my app exe is > killed from the Task Manager. > > The problem is, when i kill the SQL process, its not getting killed, > and its running and running. > I find this in both the cases of stopping the service and killing the > exe. > > What can i do to kill the process, because killing SQLPLUS is > critical; and because of this problem, two SQLPLUS processes are > overlapping with each other, when the next time i start the > exe/service. Thus, my output file, where actually i spool data (using > SQLPLUS) becomes inconsistent and this is bad. > > I couldn't find any alternative to proc.kill() [which shd. actually > kill the process immediately] > > Can any of u help me out in this ASAP?? you mean a process running on the SQL Server and shows up in a Query Analyzer window when you run the sp_who command. I have successfully killed such processes by simply running a SQLCommand with "kill <spid>" as the command text. |
|||||||||||||||||||||||