We had an issue with taking a SQL database offline, and we found that the SQL allowed more control for rolling back in-progress transactions. Here is the article that listed the SQL.
I think our problem had something to do with the SQL Agent. We ended up having to kill the process that was accessing the database, and I am pretty sure it was a SQL Agent process. Then, the database went offline, and we able to restore it.