Sometimes you want to restrict your database. You want that your database is access by only by you (Single handed) no person can access it.
To achieve this task SQL server provide a simple command with the help of this command your database will have only single connection. Below is the command which allow only single connection
ALTER DATABASE MYADDRESS SET SINGLE_USER WITH NO_WAIT
Now after your maintenance you want to revert back to Multiuser mode then below is the command which help you in that.
ALTER DATABASE YourDatabaseName SET MULTI_USER WITH NO_WAIT
Thanks & best regards, Rajat Jaiswal