Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mcrazyinsano
Starting Member
4 Posts |
Posted - 2009-03-10 : 15:29:25
|
| I would like to set it up or create a job that terminates all processes that are older than 48 hours that are sleeping except for ones from a specific host and except for ones from a specific set of application namesis this possible? |
|
|
heavymind
Posting Yak Master
115 Posts |
Posted - 2009-03-10 : 15:37:33
|
| look toward sys.dm_exec_sessions or look into sp_who2 stored proc.to kill the process you can use kill [spid] statement.the question is why would you touch these processes?Thanks, VadymMCITP DBA 2005/2008Chief DBA at http://www.db-staff.com |
 |
|
|
mcrazyinsano
Starting Member
4 Posts |
Posted - 2009-03-10 : 16:44:26
|
| they are processes that a third party app isn't always closing and we'd like to terminate them after 48 hours but certain ones need to be left running and the number of processes can vary so is there a way to script this to find all processes that aren't etc. etc. then kill off the remaining? |
 |
|
|
|
|
|