I encountered this error while making copy of the database in Microsoft SQL Server Management studio 2012. Server was a Virtual Machine and was stuck in the middle of the operation. After i aborted the operation the database was switched to single user. Server was not letting to switch the database from single user to multi-user. I took under given steps to overcome this issue.
Blocked all the connections from outside to this SQL server using windows firewall.
from sysprocesses p
inner join sysdatabases d
on p.dbid = d.dbid
where d.name = ‘dbname’
Used the above code to get the PID of the database
used the above command to kill the process and followed the under given instructions to switch the database to multi-user.
right-click on the Database > Properties > Options > [Scroll down] State > RestrictAccess > select Multi_user and click OK.