question

Equus avatar image
Equus asked

Is it possible to "copy" a database role and all it's permissions to a new role?

I have an existing access 2010 database with sqlserver 2008 backend. The database has several database roles one which I would like to copy along with all the permissions to a new database role. There are a lot of permissions and I don't really want to do manually if I don't have to.
roles
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
The site runs on voting. Please indicate all helpful answers by clicking on the thumbs up symbols next to those answers. Please indicate any one answer that lead to the best solution by clicking on the check mark next to that answer.
0 Likes 0 ·
Grant Fritchey avatar image
Grant Fritchey answered
There is no way through the GUI. You'll have to script something out to generate the script. I'd suggest using Powershell. I'm pretty sure you can even track down an example online if you look for it.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Equus avatar image Equus commented ·
Thanks you, I will look into that!
0 Likes 0 ·
Pavel Pawlowski avatar image
Pavel Pawlowski answered
You can take inspiration in my blog post [Cloning user rights in database][1]. [1]: http://www.pawlowski.cz/2011/03/cloning-user-rights-database/
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Equus avatar image Equus commented ·
I am not sure I can access your blog, but I will give it a try. A lot of restrictions on access to certain areas on the web.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.