Showing posts with label sleeping. Show all posts
Showing posts with label sleeping. Show all posts

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

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...
> Is there a way to Kill all 'sleeping' processes at once ?
> Thanks.|||Thanks.......
>--Original Message--
>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...
>> Is there a way to Kill all 'sleeping' processes at
once ?
>> Thanks.
>
>.
>

Monday, March 26, 2012

Killing all sleeping processes

Hi All,
When I run sp_who2, I see there are many sleeping processes. Instead of
killing one by one, I was wondering if there is any way to kill all
sleeping processes programmatically (MS SQL Server 2000).
Thanks a million in advance.
Best regards,
mamunHi,
It is possible to do. But Killing the sleeping user process may not be a
good idea. A user processes
may be running for 40 minutes and when you check that process may be
sleeping and you code will kill that
process.
I recommend you to, not to automate this process in production server.
Script:-
use master
go
declare @.x varchar(1000)
set @.x=''
select @.x = @.x + 'Kill' + convert(varchar(5), spid)
from master.dbo.sysprocesses where status='Sleeping'
exec (@.x)
Schedule the script thru SQL Agent jobs. THe above script can take care of 1
user kill . If you have mutiple user, you have to slightly modify the script
Thanks
Hari
SQL Server MVP
"microsoft.public.dotnet.languages.vb" <mamun_ah@.hotmail.com> wrote in
message news:1116964671.573914.189310@.g49g2000cwa.googlegroups.com...
> Hi All,
>
> When I run sp_who2, I see there are many sleeping processes. Instead of
> killing one by one, I was wondering if there is any way to kill all
> sleeping processes programmatically (MS SQL Server 2000).
> Thanks a million in advance.
> Best regards,
> mamun
>|||If the unneeded idle connections are created by applications, then it's an
issue for the developer to resolve by managing the connection pool. If the
connections are created by people logging into Query Analyzer or Enterprise
Manager, then it's an issue for the DBA to resolve by perhaps restricting
logins and permissions.
"microsoft.public.dotnet.languages.vb" <mamun_ah@.hotmail.com> wrote in
message news:1116964671.573914.189310@.g49g2000cwa.googlegroups.com...
> Hi All,
>
> When I run sp_who2, I see there are many sleeping processes. Instead of
> killing one by one, I was wondering if there is any way to kill all
> sleeping processes programmatically (MS SQL Server 2000).
> Thanks a million in advance.
> Best regards,
> mamun
>

Friday, March 23, 2012

Kill SPs then sqlserveragent stop working

We had a lot user connections with 'sleeping' mode in sysprocesses. I killed them with the status='sleeping', I realized that i might also killed some connections are not supposed to be killed.
After that, I checked event viewer, I saw 'Unable to read local eventlog (reason: The data area passed to a system call is too small). '
When I restarted the sqlserveragent service, I got'Could not start SQLserverAgent Service on local computer. The service did not return an error. This could be an internal Windows error or an internal service error. If this error persists, contact your sy
stem administrator. ' and also the following message appears in Application log '
SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role). '
1) Reboot your server.
2) Don't kill processes you don't know for sure are safe. NEVER kill a
process with a SPID under 50. Those are system processes and need to be
there. Sleeping processes do not harm SQL and typically take very little
memory.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Shannon" <anonymous@.discussions.microsoft.com> wrote in message
news:128716F6-4D97-41E6-B8E6-EC001502D843@.microsoft.com...
> We had a lot user connections with 'sleeping' mode in sysprocesses. I
killed them with the status='sleeping', I realized that i might also killed
some connections are not supposed to be killed.
> After that, I checked event viewer, I saw 'Unable to read local eventlog
(reason: The data area passed to a system call is too small). '
> When I restarted the sqlserveragent service, I got'Could not start
SQLserverAgent Service on local computer. The service did not return an
error. This could be an internal Windows error or an internal service error.
If this error persists, contact your system administrator. ' and also the
following message appears in Application log '
> SQLServerAgent could not be started (reason: SQLServerAgent must be able
to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the
SysAdmin role). '
>
|||If you want to kill off all your user connections, you might try a query
like this:
select 'kill '+convert(varchar(10),spid) from sysprocesses where dbid not in
(select dbid from sysdatabases where name in ('master','msdb') union all
select 0 as dbid) order by sysprocesses.spid
"Shannon" <anonymous@.discussions.microsoft.com> wrote in message
news:128716F6-4D97-41E6-B8E6-EC001502D843@.microsoft.com...
> We had a lot user connections with 'sleeping' mode in sysprocesses. I
killed them with the status='sleeping', I realized that i might also killed
some connections are not supposed to be killed.
> After that, I checked event viewer, I saw 'Unable to read local eventlog
(reason: The data area passed to a system call is too small). '
> When I restarted the sqlserveragent service, I got'Could not start
SQLserverAgent Service on local computer. The service did not return an
error. This could be an internal Windows error or an internal service error.
If this error persists, contact your system administrator. ' and also the
following message appears in Application log '
> SQLServerAgent could not be started (reason: SQLServerAgent must be able
to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the
SysAdmin role). '
>
|||clever! <g>
"DHatheway" <dlhatheway@.mmm.com.nospam> wrote in message
news:c5k11b$pfh$1@.tuvok3.mmm.com...
> If you want to kill off all your user connections, you might try a query
> like this:
> select 'kill '+convert(varchar(10),spid) from sysprocesses where dbid not
in
> (select dbid from sysdatabases where name in ('master','msdb') union all
> select 0 as dbid) order by sysprocesses.spid
> "Shannon" <anonymous@.discussions.microsoft.com> wrote in message
> news:128716F6-4D97-41E6-B8E6-EC001502D843@.microsoft.com...
> killed them with the status='sleeping', I realized that i might also
killed
> some connections are not supposed to be killed.
> (reason: The data area passed to a system call is too small). '
> SQLserverAgent Service on local computer. The service did not return an
> error. This could be an internal Windows error or an internal service
error.
> If this error persists, contact your system administrator. ' and also the
> following message appears in Application log '
> to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of
the
> SysAdmin role). '
>

Kill Prozess PID 52 without Reboot the Server

Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
ThanksCan you run DBCC INPUTBUFFER(52) on the server, and show us the output?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<matthias.kunz.riedering@.gmx.net> wrote in message
news:eL9iq9hJFHA.3356@.TK2MSFTNGP12.phx.gbl...
Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
Thanks|||Narayana Vyas Kondreddi schrieb:
> Can you run DBCC INPUTBUFFER(52) on the server, and show us the output?
Hello an good morning :-)
thies is the Output of the DBCC Inputbuffer
Output:
EXECUTE msdb.dbo.sp_help_alert @.order_by = N'severity ASC, message_id
ASC, database_name DESC'
Thanks
Matthias Kunz

Kill Prozess PID 52 without Reboot the Server

Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
Thanks
Can you run DBCC INPUTBUFFER(52) on the server, and show us the output?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<matthias.kunz.riedering@.gmx.net> wrote in message
news:eL9iq9hJFHA.3356@.TK2MSFTNGP12.phx.gbl...
Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
Thanks
|||Narayana Vyas Kondreddi schrieb:
> Can you run DBCC INPUTBUFFER(52) on the server, and show us the output?
Hello an good morning :-)
thies is the Output of the DBCC Inputbuffer
Output:
EXECUTE msdb.dbo.sp_help_alert @.order_by = N'severity ASC, message_id
ASC, database_name DESC'
Thanks
Matthias Kunz

Kill Prozess PID 52 without Reboot the Server

Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
ThanksCan you run DBCC INPUTBUFFER(52) on the server, and show us the output?
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
<matthias.kunz.riedering@.gmx.net> wrote in message
news:eL9iq9hJFHA.3356@.TK2MSFTNGP12.phx.gbl...
Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
Thanks|||Narayana Vyas Kondreddi schrieb:
> Can you run DBCC INPUTBUFFER(52) on the server, and show us the output?
Hello an good morning :-)
thies is the Output of the DBCC Inputbuffer
Output:
EXECUTE msdb.dbo.sp_help_alert @.order_by = N'severity ASC, message_id
ASC, database_name DESC'
Thanks
Matthias Kunzsql

Wednesday, March 21, 2012

Kill Blocked Process PID 52 without Reboot

Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
Thanks
Is it SPID 2 (Lock Monitor), 3 (Lazy Writer) or 6?
What do you get back when you do DBCC Inputbuffer(<spid>)
What is your update statement that you are using?
Simon Worth
"matthias" <matthias.kunz.riedering@.gmx.net> wrote in message
news:O7q6zdiJFHA.2936@.TK2MSFTNGP15.phx.gbl...
> Hello,
> I need help :-))
> We use an SQL 2000 Server.
> in the Systemmanager one Prozess with PID is sleeping, no databese
> context, and I can not cancel the Prozess.
> When i try to update some Data, this Prozess ist Blocking all other.
> How can i cancel this job without reboot the server.
> Thanks
|||Simon Worth schrieb:
> Is it SPID 2 (Lock Monitor), 3 (Lazy Writer) or 6?
> What do you get back when you do DBCC Inputbuffer(<spid>)
>
This is my Feedback DBCC
EXECUTE msdb.dbo.sp_help_alert @.order_by = N'severity ASC, message_id
ASC, database_name DESC'

> What is your update statement that you are using?
The Sttemaent is an stored procedure,
this stored Procedure was canceld from me, two seconds after Run :-((
And cince i canceld the Procedur, every following querry is blocked from
this SPID.
An reboot is not allowed. Is an high priority Server.
Anyone an Idea.
Matthias KUNZ

Kill Blocked Process PID 52 without Reboot

Hello,
I need help :-))
We use an SQL 2000 Server.
in the Systemmanager one Prozess with PID is sleeping, no databese
context, and I can not cancel the Prozess.
When i try to update some Data, this Prozess ist Blocking all other.
How can i cancel this job without reboot the server.
ThanksIs it SPID 2 (Lock Monitor), 3 (Lazy Writer) or 6?
What do you get back when you do DBCC Inputbuffer(<spid> )
What is your update statement that you are using?
Simon Worth
"matthias" <matthias.kunz.riedering@.gmx.net> wrote in message
news:O7q6zdiJFHA.2936@.TK2MSFTNGP15.phx.gbl...
> Hello,
> I need help :-))
> We use an SQL 2000 Server.
> in the Systemmanager one Prozess with PID is sleeping, no databese
> context, and I can not cancel the Prozess.
> When i try to update some Data, this Prozess ist Blocking all other.
> How can i cancel this job without reboot the server.
> Thanks|||Simon Worth schrieb:
> Is it SPID 2 (Lock Monitor), 3 (Lazy Writer) or 6?
> What do you get back when you do DBCC Inputbuffer(<spid> )
>
This is my Feedback DBCC
EXECUTE msdb.dbo.sp_help_alert @.order_by = N'severity ASC, message_id
ASC, database_name DESC'

> What is your update statement that you are using?
The Sttemaent is an stored procedure,
this stored Procedure was canceld from me, two seconds after Run :-((
And cince i canceld the Procedur, every following querry is blocked from
this SPID.
An reboot is not allowed. Is an high priority Server.
Anyone an Idea.
Matthias KUNZ