MS SQL Permissions


  • BINNED

    @Jaime said:

    My original question was about how you turn your development effort into a script if you made your changes directly in Management Studio

    Visual Studio has been able to compare database schemas for years. You compare your dev database to your test database (which should have the same schema as production), have everyone sign off on the changes, and use your compare tool to generate the script.



  • @Jaime said:

    point-and-click administration

    Wait, people do that? I thought that being able to write an ALTER TABLE query with eyes closed comes to you way sooner than being allowed anywhere near the DB.


  • BINNED

    It's actually the opposite. You're considered a Luddite if you actually write SQL to alter database objects.



  • @antiquarian said:

    Visual Studio has been able to compare database schemas for years. You compare your dev database to your test database (which should have the same schema as production), have everyone sign off on the changes, and use your compare tool to generate the script.

    Hah... you stepped into my carefully laid trap. That's the ideal recipe for accidentally pushing things to production. Every time I see someone doing this, they inevitably have a "whoops" moment where they push an untested bug fix into production, or deploy a half-baked feature that wasn't quite ready.

    It's much safer to pick a list of changes from source control than it is to use a compare tool. Essentially a compare tool says "make production look like dev", and then you have to go and pull all the testing stuff out of it. Everything you miss goes to production.

    Also, it's really difficult to use a compare tool if your development schedule is so fast that you are preparing version N+2 for deployment to the QA environment while version N+1 has yet to be deployed. This happens a lot with post-implementation fixes.



  • @antiquarian said:

    You're considered a Luddite if you actually write SQL to alter database objects.

    Now the only logical thing to happen is upper management catching the whiff of it. "Oh, so you just add and remove columns, like in Excel? That's cool, I'm gonna tweak the production database!

    ...hey, hey guys, where's the "Undo" button in this thing?"


Log in to reply