Showing posts with label kill. Show all posts
Showing posts with label kill. Show all posts

Tuesday, March 20, 2012

BOL says you should not kill a SELECT statement. Why not?

BOL says this about the KILL command:
Use KILL very carefully, especially when critical processes are
running. You cannot kill your own process. Other processes not to kill
are:
AWAITING COMMAND
CHECKPOINT SLEEP
LAZY WRITER
LOCK MONITOR
SELECT
SIGNAL HANDLER
Those all make sense except for the SELECT but BOL doesn't elaborate on
why you shouldn't kill a SELECT statement. Any ideas why they caution
against this?
ThanksIt must be a mistake. They removed it from 2005 BOL.
<pshroads@.gmail.com> wrote in message
news:1154975355.227889.163170@.m79g2000cwm.googlegroups.com...
> BOL says this about the KILL command:
> Use KILL very carefully, especially when critical processes are
> running. You cannot kill your own process. Other processes not to kill
> are:
> AWAITING COMMAND
> CHECKPOINT SLEEP
> LAZY WRITER
> LOCK MONITOR
> SELECT
> SIGNAL HANDLER
> Those all make sense except for the SELECT but BOL doesn't elaborate on
> why you shouldn't kill a SELECT statement. Any ideas why they caution
> against this?
> Thanks
>

BOL says you should not kill a SELECT statement. Why not?

BOL says this about the KILL command:
Use KILL very carefully, especially when critical processes are
running. You cannot kill your own process. Other processes not to kill
are:
AWAITING COMMAND
CHECKPOINT SLEEP
LAZY WRITER
LOCK MONITOR
SELECT
SIGNAL HANDLER
Those all make sense except for the SELECT but BOL doesn't elaborate on
why you shouldn't kill a SELECT statement. Any ideas why they caution
against this?
ThanksIt must be a mistake. They removed it from 2005 BOL.
<pshroads@.gmail.com> wrote in message
news:1154975355.227889.163170@.m79g2000cwm.googlegroups.com...
> BOL says this about the KILL command:
> Use KILL very carefully, especially when critical processes are
> running. You cannot kill your own process. Other processes not to kill
> are:
> AWAITING COMMAND
> CHECKPOINT SLEEP
> LAZY WRITER
> LOCK MONITOR
> SELECT
> SIGNAL HANDLER
> Those all make sense except for the SELECT but BOL doesn't elaborate on
> why you shouldn't kill a SELECT statement. Any ideas why they caution
> against this?
> Thanks
>

Sunday, March 11, 2012

blocking prevent maintenance to run

I am having intermittent issues with a team that has an Access front end
that hits SQL2000sp3a+. They are wanting me to do some type of kill of all
users in the db prior to running the DBCC DBREINDEX that is done during the
night. Granted I could do a DBCC INDEXDEFRAG for online.
I see the application causing the problem. They have confirmed that some
users are leaving reports open that are bound to data, which I assume is
causing the issue.
1. Is it possible to selectively kill the process that is causing the block
as to kill all users in the db?
I am open to ideas how to address the issue. How to battle being forced to
implement a server side bandaid to a application issue.Look up Alter Database in BOL. See the restricted_user and single_user
options with Rollback Immediate.
"CD" <mcdye1@.hotmail.REMOVETHIS.com> wrote in message
news:OJJRZhzdFHA.612@.TK2MSFTNGP12.phx.gbl...
>I am having intermittent issues with a team that has an Access front end
>that hits SQL2000sp3a+. They are wanting me to do some type of kill of all
>users in the db prior to running the DBCC DBREINDEX that is done during the
>night. Granted I could do a DBCC INDEXDEFRAG for online.
> I see the application causing the problem. They have confirmed that some
> users are leaving reports open that are bound to data, which I assume is
> causing the issue.
> 1. Is it possible to selectively kill the process that is causing the
> block as to kill all users in the db?
> I am open to ideas how to address the issue. How to battle being forced
> to implement a server side bandaid to a application issue.
>

blocking prevent maintenance to run

I am having intermittent issues with a team that has an Access front end
that hits SQL2000sp3a+. They are wanting me to do some type of kill of all
users in the db prior to running the DBCC DBREINDEX that is done during the
night. Granted I could do a DBCC INDEXDEFRAG for online.
I see the application causing the problem. They have confirmed that some
users are leaving reports open that are bound to data, which I assume is
causing the issue.
1. Is it possible to selectively kill the process that is causing the block
as to kill all users in the db?
I am open to ideas how to address the issue. How to battle being forced to
implement a server side bandaid to a application issue.
Look up Alter Database in BOL. See the restricted_user and single_user
options with Rollback Immediate.
"CD" <mcdye1@.hotmail.REMOVETHIS.com> wrote in message
news:OJJRZhzdFHA.612@.TK2MSFTNGP12.phx.gbl...
>I am having intermittent issues with a team that has an Access front end
>that hits SQL2000sp3a+. They are wanting me to do some type of kill of all
>users in the db prior to running the DBCC DBREINDEX that is done during the
>night. Granted I could do a DBCC INDEXDEFRAG for online.
> I see the application causing the problem. They have confirmed that some
> users are leaving reports open that are bound to data, which I assume is
> causing the issue.
> 1. Is it possible to selectively kill the process that is causing the
> block as to kill all users in the db?
> I am open to ideas how to address the issue. How to battle being forced
> to implement a server side bandaid to a application issue.
>

blocking prevent maintenance to run

I am having intermittent issues with a team that has an Access front end
that hits SQL2000sp3a+. They are wanting me to do some type of kill of all
users in the db prior to running the DBCC DBREINDEX that is done during the
night. Granted I could do a DBCC INDEXDEFRAG for online.
I see the application causing the problem. They have confirmed that some
users are leaving reports open that are bound to data, which I assume is
causing the issue.
1. Is it possible to selectively kill the process that is causing the block
as to kill all users in the db?
I am open to ideas how to address the issue. How to battle being forced to
implement a server side bandaid to a application issue.Look up Alter Database in BOL. See the restricted_user and single_user
options with Rollback Immediate.
"CD" <mcdye1@.hotmail.REMOVETHIS.com> wrote in message
news:OJJRZhzdFHA.612@.TK2MSFTNGP12.phx.gbl...
>I am having intermittent issues with a team that has an Access front end
>that hits SQL2000sp3a+. They are wanting me to do some type of kill of all
>users in the db prior to running the DBCC DBREINDEX that is done during the
>night. Granted I could do a DBCC INDEXDEFRAG for online.
> I see the application causing the problem. They have confirmed that some
> users are leaving reports open that are bound to data, which I assume is
> causing the issue.
> 1. Is it possible to selectively kill the process that is causing the
> block as to kill all users in the db?
> I am open to ideas how to address the issue. How to battle being forced
> to implement a server side bandaid to a application issue.
>

Thursday, March 8, 2012

Blocking

Is there a way to setup SQL server to automatically kill a
blocking process after a certain time frame (after maybe 5
Minutes for example)?
We are running SQL Server 2000 service pack 3a.
I second this question! Anyone have an easy solution for this?
will
"Wendy" wrote:

> Is there a way to setup SQL server to automatically kill a
> blocking process after a certain time frame (after maybe 5
> Minutes for example)?
> We are running SQL Server 2000 service pack 3a.
>
|||There is no way to do this automatically in SQL Server 2000. You can set up
a job that inspects sysprocesses periodically, looking at who is blocked,
and the wait_time, and then see who has blocked them. But you'll want to see
if the blocker is also being blocked, before indiscriminately issuing KILLs.
In fact, anything 'automatic' might have a problem with killing the 'wrong'
process.
SQL 2005 allows you to configure a 'blocked process threshold', to generate
an event when someone is blocked longer than the amount of time you
configure. So it will save you the periodic scanning of sysprocesses, but
you'll still have to apply some logic to figure out who you want to KILL (if
anyone) when a process does exceed that threshold.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"we7313" <we7313@.discussions.microsoft.com> wrote in message
news:D235A6DC-59B4-4997-B376-146D8666DE9A@.microsoft.com...
>I second this question! Anyone have an easy solution for this?
> --
> will
>
> "Wendy" wrote:
>

Blocking

Is there a way to setup SQL server to automatically kill a
blocking process after a certain time frame (after maybe 5
Minutes for example)?
We are running SQL Server 2000 service pack 3a.I second this question! Anyone have an easy solution for this?
--
will
"Wendy" wrote:

> Is there a way to setup SQL server to automatically kill a
> blocking process after a certain time frame (after maybe 5
> Minutes for example)?
> We are running SQL Server 2000 service pack 3a.
>|||There is no way to do this automatically in SQL Server 2000. You can set up
a job that inspects sysprocesses periodically, looking at who is blocked,
and the wait_time, and then see who has blocked them. But you'll want to see
if the blocker is also being blocked, before indiscriminately issuing KILLs.
In fact, anything 'automatic' might have a problem with killing the 'wrong'
process.
SQL 2005 allows you to configure a 'blocked process threshold', to generate
an event when someone is blocked longer than the amount of time you
configure. So it will save you the periodic scanning of sysprocesses, but
you'll still have to apply some logic to figure out who you want to KILL (if
anyone) when a process does exceed that threshold.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"we7313" <we7313@.discussions.microsoft.com> wrote in message
news:D235A6DC-59B4-4997-B376-146D8666DE9A@.microsoft.com...
>I second this question! Anyone have an easy solution for this?
> --
> will
>
> "Wendy" wrote:
>
>

Wednesday, March 7, 2012

Blocking

Is there a way to setup SQL server to automatically kill a
blocking process after a certain time frame (after maybe 5
Minutes for example)?
We are running SQL Server 2000 service pack 3a.I second this question! Anyone have an easy solution for this?
--
will
"Wendy" wrote:
> Is there a way to setup SQL server to automatically kill a
> blocking process after a certain time frame (after maybe 5
> Minutes for example)?
> We are running SQL Server 2000 service pack 3a.
>|||There is no way to do this automatically in SQL Server 2000. You can set up
a job that inspects sysprocesses periodically, looking at who is blocked,
and the wait_time, and then see who has blocked them. But you'll want to see
if the blocker is also being blocked, before indiscriminately issuing KILLs.
In fact, anything 'automatic' might have a problem with killing the 'wrong'
process.
SQL 2005 allows you to configure a 'blocked process threshold', to generate
an event when someone is blocked longer than the amount of time you
configure. So it will save you the periodic scanning of sysprocesses, but
you'll still have to apply some logic to figure out who you want to KILL (if
anyone) when a process does exceed that threshold.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"we7313" <we7313@.discussions.microsoft.com> wrote in message
news:D235A6DC-59B4-4997-B376-146D8666DE9A@.microsoft.com...
>I second this question! Anyone have an easy solution for this?
> --
> will
>
> "Wendy" wrote:
>> Is there a way to setup SQL server to automatically kill a
>> blocking process after a certain time frame (after maybe 5
>> Minutes for example)?
>> We are running SQL Server 2000 service pack 3a.
>

Blocked by SPID -2

Hi,
I am using SQL Server 2000 with SP3.
Why am I being blocked by spid -2? I am not able to kill
it and have to restart SQL Server to get around it.
Warm Regards,
DhanunjayIt's a system process - it depends on what you are doing and
what the process is and what it's doing at the time. Don't
think anyone can tell you why without knowing more
information.
-Sue
On Tue, 16 Sep 2003 00:03:45 -0700, "Dhanunjay"
<vdhanunjay@.hotmail.com> wrote:
>Hi,
>I am using SQL Server 2000 with SP3.
>Why am I being blocked by spid -2? I am not able to kill
>it and have to restart SQL Server to get around it.
>Warm Regards,
>Dhanunjay