• I think you'd have to execute some of these steps separately. These commands aren't usually meant to be run in a proc, or often, as they make a substantial change to the way the db works. You typically set this once and leave it alone.

    And you should use ALTER DATABASE instead.