Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Kill a SPID

By Steve Jones,

I know some people get a kick out of running the KILL command. Heck, I'm sure all of us enjoy stopping a runaway process from an annoying user at times. But not everyone seems to understand exactly how databases work. It's not necessarily a knock on the original poster, after all, most of us had to learn about the ACID properties at some point. Perhaps even after someone dropped a database in our lap without warning.

If you kill a spid, I saw some confusion about data loss in a recent thread. You won't lose data, but you could still have a problem. It's not a technical problem and the storage engine inside SQL Server ensures that the transaction conforms to the ACID properties to ensure data integrity.

The users, however, might or might not realize that their "work" was not done. It depends on the error handling of your application, what message (if any) that is presented to the user, and if they're even still around. I've seen people start processes they expected to run long and then leave their workstation. If there wasn't a message on it later, they might assume the transaction had gone through.

Even if you tell them you're killing the process, they might still think that some amount of work is completed. There are all sorts of users, with all different kinds of expectations out there, so you should be sure that they understand exactly what is happening.

And be sure that they know their "work" is lost. From the point of view of someone doing data entry, if the transaction rolls back and the application can't handle it, they will have to enter information again. So their work is essentially lost.

Those of us in technology sometimes forget the impact of our systems in the real world. Even when things work well or as designed, they may still be a problem for real people that have real tasks to get done.

Total article views: 286 | Views in the last 30 days: 2
Related Articles

Tuning People?

Database people are used to changing the hardware of the server on which a problem database resides...


Are you a DBA? You might Be!

 Are you a DBA? You might Be! On Twitter, people do a lot more than gossip and post messages about ...


Sales People & Commission

I saw this post by Neil Davidson about sales people being different that discusses how sales people ...


SQL Injection, Still?

We still have problems with SQL Injection. Steve Jones has a few thoughts on why.


Going over their heads: IT Decisions

Phil factor points out that Marketing people who appeal directly to enterprise CIOs are generally wa...


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones