• Yeah, running that ALTER DATABASE command requires an X lock on the DB in question, so you effectively have to be the only session using the DB.

    You could run it using WITH ROLLBACK IMMEDIATE to get around that, but you'd obviously want to make sure nothing "important" was running in the DB. I'm paranoid, so I'd probably make it a maintenance window, to be safest.

    Cheers!