Enhanced Support
asked on
Reading Task Manager Processes
I see that there is an extended stored procedure within SQL Server called xp_terminate_process which will terminate a process running within task manager. Is it possible to read through the process list to see whether a project is running, not by its PID but by its name?
For example, if I were to have a program called TestApp.exe running which then is terminated, I would like SQL Server to fire an email using Database Mail to alert a user that the program is no longer running. I have the rest of the routine worked out, just not the part that actually reads the entries in the process tab of Task Manager.
Any ideas?
Thank you.
For example, if I were to have a program called TestApp.exe running which then is terminated, I would like SQL Server to fire an email using Database Mail to alert a user that the program is no longer running. I have the rest of the routine worked out, just not the part that actually reads the entries in the process tab of Task Manager.
Any ideas?
Thank you.
ASKER
The client is actually using MSDE but I can see that this could be useful for other applications in future.
I would have thought that as SQL Server can obviously see the Task Manager entries to kill the task, surely it should be able to query them? The whole point is to monitor when a program is no longer running from within SQL Server itself rather than building another program to act as the monitor.
I would have thought that as SQL Server can obviously see the Task Manager entries to kill the task, surely it should be able to query them? The whole point is to monitor when a program is no longer running from within SQL Server itself rather than building another program to act as the monitor.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, Randy - think that will probably do what we need. I'll google the rest !
Mark
Mark
It it's SQL 2000, you could do the same thing in DTS with an ActiveX Script ... would need to use WMI but that's not too hard either.