Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 kill User

Author  Topic 

PatDeV
Posting Yak Master

197 Posts

Posted - 2006-06-02 : 09:51:28
Hi all

I am trying to kill @spid
but it does not work.

it returns this
SPID 124: transaction rollback in progress. Estimated rollback completion: 100%. Estimated time remaining: 0 seconds.


But the process is still running and did not finished at all!!

What is the alternat way to do it.

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2006-06-02 : 09:54:50
It's saying that the spid is rolling back. That it's completed without dying makes me think that maybe it's waiting for an external response before it can die - bcp, xp_cmdshell, xp_sendmail, linked server, ...


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

PatDeV
Posting Yak Master

197 Posts

Posted - 2006-06-02 : 10:05:36
How can i clear that then!!

Please help

Thanks
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-06-02 : 10:09:21
You could try restarting the server if that's an option.

-------
Moo. :)
Go to Top of Page

PatDeV
Posting Yak Master

197 Posts

Posted - 2006-06-02 : 10:19:09
no can't do that in middle of day or at night too!!
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-06-02 : 10:25:24
I don't believe that there is another way of sorting it.

-------
Moo. :)
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-06-02 : 10:27:56
I have never seen anything fix it, except for restarting SQL Server.




CODO ERGO SUM
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-06-02 : 11:00:54
If it helps at all, I think you just need to restart the (sql server) service rather than the whole box.

Be One with the Optimizer
TG
Go to Top of Page

PatDeV
Posting Yak Master

197 Posts

Posted - 2006-06-02 : 11:08:55
I will have to try that.

thanks for the help.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-06-02 : 11:21:53
If it's waiting on an external process like bcp then you can kill the bcp thread in windows.
If it's a result from a linked server then kill the spid on the linked server.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

PatDeV
Posting Yak Master

197 Posts

Posted - 2006-06-02 : 11:26:31
I tried that too and killed users on Linked server too but it still not working on the main server.

and how can in kill bcp in windows?

Thanks
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-06-02 : 11:38:52
Look at the processes there would be a bcp process there.
You need to find what your spid is doing.
try dbcc inputbuffer (spid)
and
DECLARE @sql_handle binary(20)
SELECT @sql_handle = sql_handle
FROM master.dbo.sysprocesses
WHERE spid = @blkspid
AND ecid = 0
SELECT *
FROM ::fn_get_sql(@sql_handle)

set @blkspid

and see if they tell you anything.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-06-02 : 12:30:03
can you tell us what you did instead of shooting in the dark? Or don't you know?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

PatDeV
Posting Yak Master

197 Posts

Posted - 2006-06-02 : 13:53:09
For all SPID the SQL Handler
is like
0x0000000000000000000000000000000000000000
Go to Top of Page
   

- Advertisement -