I right clicked on a database in SQL Server Management Studio and selected rename. Gave it a new name and hit enter. Eventually this error comes back:
Msg 5030, Level 16, State 2, Line 1
The database could not be exclusively locked to perform the operation.
The better way to rename the database is using SQL running these queries:
use master; ALTER DATABASE [database.name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; ALTER DATABASE [database.name] MODIFY NAME = [database.name.old]; ALTER DATABASE [database.name.old] SET MULTI_USER;