MissTips, Running sp_detach_db will not succeed if connections still exist to the database that you want to detach. When connections still exist to the database that you are trying to detach, running sp_detach_db gives the following error message: "Cannot detach the database 'd_HEAT' because it is currently in use."
I think saw15 wants to know, as I do, the T-SQL command(s), which can be executed in Query Analyzer, to stop all connections to a target database (in preparation to detach that database).
Thanks for an answer on this.