471,073 Members | 1,299 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

copy a role

hi,
just wonder, can we copy a role then add some new priviledges to the
new role.
hm.. i means, example; now i have a role named role_a. Then I copy
role_a to create role_b. After I created role_b from role_a, i would
like to revoke some privileges in role_b without affecting role_a. Can
I and how to write the script?

regards,
tracy
Jul 19 '05 #1
1 6830
tr********@yahoo.com.hk (tracy) wrote in message news:<5c**************************@posting.google. com>...
hi,
just wonder, can we copy a role then add some new priviledges to the
new role.
hm.. i means, example; now i have a role named role_a. Then I copy
role_a to create role_b. After I created role_b from role_a, i would
like to revoke some privileges in role_b without affecting role_a. Can
I and how to write the script?

regards,
tracy


When a newsgroup has sub-groups you should generally post only to the
sub-groups. Many newsreaders no longer carry comp.databases.oracle
anymore so you are missing access to many of the better board readers.

You can query sys.role_tab_privs to generate a list of object
privileges granted to the role.

In the case of where you just want to add a few additional privileges
to what an existing role has you can grant the existing role and the
new privs to the new role.

When you want to remove privileges then you have to create a new role
and perform all the necessary grants to it.

HTH -- Mark D Powell --
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by comp_databases_ms-sqlserver | last post: by
3 posts views Thread by Marcel | last post: by
6 posts views Thread by AllenGnr | last post: by
6 posts views Thread by Dhirendra Singh | last post: by
1 post views Thread by tracy | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.