Re: copy a role

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 14 Jan 2004 07:33:36 -0800
Message-ID: <2687bb95.0401140733.12862303_at_posting.google.com>


tracykim10_at_yahoo.com.hk (tracy) wrote in message news:<5c91cce9.0401140040.2229cbc1_at_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 -- Received on Wed Jan 14 2004 - 16:33:36 CET

Original text of this message