Back to previous

How to kill database in use process for restoration?

I recently installed SQL 2008 on my machine and once I tried to restore a database, it failed as it complaint as the database was currently in use. In SQL 2005, we normally go to activity monitor to kill the process but this is a little different in SQL 2008. The easiest solution now is to run this little query.

alter database database name set restricted_user with rollback immediate

ShareThis

If you think this post is useful, please recommend me at the bottom of the page. ;)

Discussion