Wednesday, March 28, 2012

Killing Sleeping Processes

Is there a way to Kill all 'sleeping' processes at once ?
Thanks.Hi,
Do not take a risk in killing all the sleeping process . But the way is,
select 'kill '+convert(char,spid) +char(10)+'go' from master..sysprocess
where status like 'sleep%'
Execute the output of the above script in query analyzer. This will kill all
the sleeping process
Thanks
Hari
MCDBA
"Brian" <anonymous@.discussions.microsoft.com> wrote in message
news:5e2a01c3e5b3$358bb1c0$a401280a@.phx.gbl...
quote:

> Is there a way to Kill all 'sleeping' processes at once ?
> Thanks.
|||Thanks.......
quote:

>--Original Message--
>Hi,
>Do not take a risk in killing all the sleeping process .

But the way is,
quote:

>select 'kill '+convert(char,spid) +char(10)+'go' from

master..sysprocess
quote:

>where status like 'sleep%'
>Execute the output of the above script in query analyzer.

This will kill all
quote:

>the sleeping process
>Thanks
>Hari
>MCDBA
>
>"Brian" <anonymous@.discussions.microsoft.com> wrote in

message
quote:

>news:5e2a01c3e5b3$358bb1c0$a401280a@.phx.gbl...
once ?[QUOTE]
>
>.
>
sql

No comments:

Post a Comment