Jonathan Mallia (9/24/2013)
It's far better to set the database to SINGLE user mode with ROLLBACK IMMEDIATE, immediately return it to MULTI user mode ....
The 'with ROLLBACK IMMEDIATE' will automaticcaly kill the connections or will wait until the connections are dropped and will not accept new connections?
Thanks:)
No. ROLLBACK IMMEDIATE doesn't kill connections. The SET SINGLE_USER does that.
The best thing to do is to lookup ALTER DATABASE in "Books Online" and read about these options and the related caveates before using them.
--Jeff Moden
Change is inevitable... Change for the better is not.