• If you are attempting to get the db into single user mode, you can use.

    ALTER DATABASE db_name

    SET SINGLE_USER

    WITH ROLLBACK IMMEDIATE