Classic issue – a database has (for whatever reason) been set to single-user and the one session available is being used . . .But now you need to free that session and/or make the database multi-user again.

Trying to free the session using the database properties in the SSMS GUI won’t work, you don’t have access to that session. Make life easier by making use of T-SQL.

First, run SP_Who. This will produce a list all the active connections to all databases.  Note the session ID of the active connection to the database you’re interested in.

Second, run the  KILL <<SESSION ID>> to kill the connection made by that pesky user.

The session for the database is now free, another user can access the database.

If you wish to put the database  in multi-user mode (so more than one person can access the database at a time), run the following

ALTER DATABASE <<DATABASE NAME>>
SET MULTI_USER

The following will roll back and transactions which the user may have made immediately.

ALTER DATABASE <<DATABASE NAME>>
WITH ROLLBACK IMMEDIATE 
SET MULTI_USER

To put the database in to single user mode replace the MULTI_USER with SINGLE_USER.