Disconnect all other user from DB
The best way to do it by setting the database in single user by following commands:
ALTER DATABASE database_name SET SINGLE_USER WITH ROLLBACK IMMEDIATE
//Do the job and set it back to multi user
ALTER DATABASE database_name SET MULTI_USER WITH NO_WAIT