• 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


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)