Here's a script, for killing a SPIDs against a particular database, here am using BIN as the database. We have to change the name of the database accordingly.
This script can be used when we need to check for blockings on a database and helpful, when we have to restore a database especially when the database is in use while restore.
---------------------------------------------------------------