Wednesday, March 21, 2012

kill a large spid

hi,
from profiler, i've a spid that has a value of 1994834. the kill command
won't work... The error message is:
Msg 6101, Level 16, State 1, Line 1
Process ID 1994834is not a valid process ID. Choose a number between 1 and
1024.
here is the sql info for the box...
Microsoft SQL Server 2005 - 9.00.3161.00 (X64) Apr 3 2007 11:14:20
Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on
Windows NT 5.2 (Build 3790: Service Pack 2)Why are you using profiler to view the SPID? What does sp_who2 show as a
SPID for that process?
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:C5420913-B755-44B3-8885-172D02FC2FD1@.microsoft.com...
> hi,
> from profiler, i've a spid that has a value of 1994834. the kill command
> won't work... The error message is:
> Msg 6101, Level 16, State 1, Line 1
> Process ID 1994834is not a valid process ID. Choose a number between 1 and
> 1024.
> here is the sql info for the box...
> Microsoft SQL Server 2005 - 9.00.3161.00 (X64) Apr 3 2007 11:14:20
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on
> Windows NT 5.2 (Build 3790: Service Pack 2)|||You could also use the Activity Monitor.
--
Ekrem Ã?nsoy
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:C5420913-B755-44B3-8885-172D02FC2FD1@.microsoft.com...
> hi,
> from profiler, i've a spid that has a value of 1994834. the kill command
> won't work... The error message is:
> Msg 6101, Level 16, State 1, Line 1
> Process ID 1994834is not a valid process ID. Choose a number between 1 and
> 1024.
> here is the sql info for the box...
> Microsoft SQL Server 2005 - 9.00.3161.00 (X64) Apr 3 2007 11:14:20
> Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit)
> on
> Windows NT 5.2 (Build 3790: Service Pack 2)|||i was using profiler to see other things and bump into that spid.
that process is cleared, now. profiler showed me it had duration over
2000000 and using 5 cpu. after clearning that process, it released the
memory pressure of the box; released 20% of the memory.
how else would be a better way to find run away process (like extra long
duration) and find the assoicated spid on an 05 box? sp_who2 doesn't have
"duration".
thanks.|||Profiler will only show duration after the statement or sp is completed. So
in the case of long running code that you may want to kill it does not help
very much. You might want to take a look at sys.dm_exec_requests and some of
the associated dmvs.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"light_wt" <lightwt@.discussions.microsoft.com> wrote in message
news:B21F4598-393E-43B5-950D-3E2AA1CC32AA@.microsoft.com...
>i was using profiler to see other things and bump into that spid.
> that process is cleared, now. profiler showed me it had duration over
> 2000000 and using 5 cpu. after clearning that process, it released the
> memory pressure of the box; released 20% of the memory.
> how else would be a better way to find run away process (like extra long
> duration) and find the assoicated spid on an 05 box? sp_who2 doesn't have
> "duration".
> thanks.

No comments:

Post a Comment