• i use this:

    ALTER DATABASE Northwind SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    EXEC sp_dboption 'Northwind', 'single user', 'FALSE'