I agree with the other participants that there is not enough information to provide the exact solution. The following script, however, may help you get started:
Here is a variation of the kill script that can be used on any database whether or not it is the current database. To use, set the @dbname variable to...