• Or this:ALTER DATABASE SQLTRIX SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    You can use RESTRICTED USER instead of SINGLE USER if that's more appropriate (in other words if none of the processes that are likely to connect to the database will do so as db_owner or higher).

    John