copy a role

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tracy

    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
  • Mark D Powell

    #2
    Re: copy a role

    tracykim10@yaho o.com.hk (tracy) wrote in message news:<5c91cce9. 0401140040.2229 cbc1@posting.go ogle.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_pr ivs 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 --

    Comment

    Working...