Sunday, February 19, 2012

How to kill a process

Our application uses SQL 2000 for back end and Access 2003 mdb for front end
and uses ODBC to link together.
One of our users appended data to one table. Because inserted duplicate data
in primary key. The user ignored system warning message and just turned off
her computer. While the user turned on her computer again, the table could
not open it.
We checked SQL 2000 server, the locking process was found in process
information, locks/process ID and lock/object in management. We disconnected
all front end sides application, then tried to kill the process using SQL
server Enterprise Manager console. But it was failed.
Would you help me how to kill the process then unlock this object?
Thanks
When you kill a process that has a transaction open, that transaction has to
be rolled back before the process is completely killed. If it is a large
transaction, it can take a long time for the transaction to roll back. You
can check in the Current Activity pane in Enterprise Manager what the status
is of the process. It should show up as KILLED/ROLLBACK. You can also get
the status of the process with KILL <process id> WITH STATUSONLY in Query
Analyzer. You can find the process id in the Current Activity in Enterprise
Manager.
Jacco Schalkwijk
SQL Server MVP
"NzCharlie" <NzCharlie@.discussions.microsoft.com> wrote in message
news:131B6064-D73D-432C-96C1-CF58C90BD0C8@.microsoft.com...
> Our application uses SQL 2000 for back end and Access 2003 mdb for front
> end
> and uses ODBC to link together.
> One of our users appended data to one table. Because inserted duplicate
> data
> in primary key. The user ignored system warning message and just turned
> off
> her computer. While the user turned on her computer again, the table could
> not open it.
> We checked SQL 2000 server, the locking process was found in process
> information, locks/process ID and lock/object in management. We
> disconnected
> all front end sides application, then tried to kill the process using SQL
> server Enterprise Manager console. But it was failed.
> Would you help me how to kill the process then unlock this object?
> Thanks
>
|||"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid > wrote
in message news:%23AuJx9K3EHA.3820@.TK2MSFTNGP11.phx.gbl...
> When you kill a process that has a transaction open, that transaction has
to
> be rolled back before the process is completely killed. If it is a large
> transaction, it can take a long time for the transaction to roll back. You
> can check in the Current Activity pane in Enterprise Manager what the
status
> is of the process. It should show up as KILLED/ROLLBACK. You can also get
> the status of the process with KILL <process id> WITH STATUSONLY in Query
> Analyzer. You can find the process id in the Current Activity in
Enterprise
> Manager.
>
What he's hitting up against here I bet though is a "bug" I've seen before
where if the client closes improperly, it can be impossible to kill the
connection.
I think SQL SP1 still had this problem but that it's fixed in SP3a.
[vbcol=seagreen]
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "NzCharlie" <NzCharlie@.discussions.microsoft.com> wrote in message
> news:131B6064-D73D-432C-96C1-CF58C90BD0C8@.microsoft.com...
could[vbcol=seagreen]
SQL
>

No comments:

Post a Comment