Exporting User Permissions to Script

  • How would you export a list of users and their permissions to a T-SQL script? I'd like to store this in subversion, for better documentation and control over permissions. I'm working with a legacy database, with dozens of users that no one really understands. I've had cases where drop/creating an object during an update wipes out any associated permissions with that object, and without the permissions documented anywhere outside the db, it's very difficult to restore the correct permissions.

  • There are tons of scripts to choose from here. Use the Search box above to look for "script user permissions". I like this one: http://www.sqlservercentral.com/scripts/31776/ which scripts permissions for all the databases in an instance, but there scripts that will do the same for a single database.

    Greg

  • Thanks, that's exactly what I'm looking for.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply