I've been using SQL Server 2005 SMS for a few years and have had no problem backing up my database and restoring to my test database (the server being accessed is 2005 Standard). I've now had the computer upgraded, and got a new version of SQL Server 2008 R2 on my machine. The SMS now comes up with this error when trying to do a restore: >**Exclusive access could not be obtained because the database is in use.** I'm the only user of the test database, and it only gets queried occasionally so it's never always being used. Any ideas on how I can do my restores now? **sp_who2:** ![spwho2] **Error Screenshot: (note, the server is NOT running sqlexpress, we just left the name when we upgraded** ![Restore Error] **EDIT:** In the end, we rebooted the server and the problem went away. Thanks for the help. : /upfiles/spwho2_1.png : /upfiles/restoreerror.png
Assuming it's not a production database and it's not you connected to the database, you can do this: ALTER DATABASE AdventureWorks SET SINGLE_USER WITH ROLLBACK IMMEDIATE But doing that on a production system is inherently dangerous. If legitimate users are on the system, this will blast them off.
Given your screenshot from the `sp_who2` has returned only one row, it seems to me as though you're not admin on that server, therefore you can't actually see anyone else connected to your database. Is this the case?