November 25, 2009 at 7:14 am
Hi There,
Is there any script or SP that can generate user permissions for database\tables\SP's to be reapplied?
Im trying to find a way of creating a single script that will output all the users and their permissions for a database so I can put it back later ( just like when you use management studio to generate a script for users and permissions and just like Idera's SQL Permissions application ).
Here is my scenario:
I am asked to restore a database that already exists ( overwrite the database ) from one server to another.
1)Before I restore, I have to script out the current users and their permissions on the database.
2)I restore the database ( RESTORE DATABASE [TEST] .......WITH REPLACE )
3)I reapply the user permissions I scripted out earlier ( as they were before the restore )
What I am looking for is a script or SP that takes all the current users in a database and generates a script based on their current permissions on a database ( like GRANT EXEC TO ON [dbo.StoredProcedure], EXEC sp_grantdbaccess..... )
Does anyone know of a way to do this?:unsure:
November 27, 2009 at 9:59 am
Hi
Review this article, it contains your requirements.
November 27, 2009 at 10:05 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply