• sslyle-1091060 (1/28/2014)


    I'm looking for an efficient way to grant/block database permissions based on which server a user connects to.

    I have a development server that has a copy of a database which grants development users fairly open permissions (execute/create/drop/alter/read).

    When I copy this database to the production server I want the development users to only have read access. I want this to happen for no more reason that I copied the database between the two servers.

    What is a way to get this done with very low administrative overhead?

    The easiest way is to list out the database users and then drop them, then add them back with read permission only. Otherwise your script will have to list out current permissions too and then revoke them, messy!

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉