How to Change a Database To Single User Mode or Multi User Mode

Change the Database From Multi User Mode to Single User Mode:

Change the Database From Single User Mode to Multi User Mode:

Chnage the Database To Single User Mode or Multi User Mode by Using T-SQL:

--How to put Database in single user modeUSE [master] GOALTER DATABASE [Demo] SET SINGLE_USER WITH rollback ImmediateGO--How to put Database in multi user modeUSE [master] GOALTER DATABASE [Demo] SET MULTI_USER WITH NO_WAIT GO