Wednesday, July 17, 2013

One Feature I really like in SSMS 2012 – Close Existing Connections

I always used to get frustrated whenever I was doing restores in SSMS 2008 and previous versions where I would get blocked because databases had connections and I cannot get exclusive lock. I would have to script out and add

  1. Set Single User with rollback immediate
  2. Restore database
  3. Set database to multiuser mode

With SSMS 2012 GUI, they already include the option to drop all connections and run the restore(Basically setting single user and multiuser) . It runs pretty seamless and worth it.

This Feature works with SQL 2012, SQL 2008 R2, SQL 2008, and SQL 2005. I haven’t much opportunity to test on SQL 2000 and prior versions. This option didn’t come up for

Here is a screenshot

 

1

Thanks!

No comments:

Post a Comment