Set databse into single user mode
ALTER DATABASE <DBNAME> SET
SINGLE_USER WITH Rollback Immediate
Set database into multi user mode
ALTER DATABASE [DBNAME] SET
MULTI_USER WITH NO_WAIT
Set databse into single user mode
ALTER DATABASE <DBNAME> SET
SINGLE_USER WITH Rollback Immediate
Set database into multi user mode
ALTER DATABASE [DBNAME] SET
MULTI_USER WITH NO_WAIT
We were trying to take a database offline and it eventually failed fter about 5 minutes. I didn’t want to restart the SQL services or the server as there were many other databases on the server.
The simple way to fix this error is to merely close and then re-open the management studio.
I was trying to install some extra features to an existing SQL 2008 installation, and when I ran the install, the system configuration check would come back with a fail saying that a reboot is required. I rebooted the server, and when I ran the configuration check again, it still failed and required a reboot. I had seen a similar problem with Symantec AV getting stuck because of a registry entry problem. Here are the steps to fix the problem. For me, it was 2 entries placed there by Logitech.
1: Start regedit.exe
2: Navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager
3: Locate PendingFileRenameOperations
4: Remove any data associated with the value (you may want to export the value for later review)
5: Rerun installation and the check should pass. (There is generally no need to reboot, but you may have to in some circumstances)
PLEASE NOTE: Highlight “Session Manager” in the lefthand Window of Regedit, then look in the list in the right hand Window for the “PendingFileRenameOperations” String and double click on that. This is where you need to delete the entries from.