This discussion is archived
2 Replies Latest reply: Nov 19, 2012 9:13 PM by Aman.... RSS

role definition

user522961 Newbie
Currently Being Moderated
Hi,
on 10g R2 on AIX
in which table can I find the definition of a role ? I mean the script used to create it ?

Thank you.
  • 1. Re: role definition
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
     SELECT dbms_metadata.get_ddl('ROLE','Role-name') from dual;
    Also Check this thread
    how to get ddl of users and roles?
  • 2. Re: role definition
    Aman.... Oracle ACE
    Currently Being Moderated
    user522961 wrote:
    Hi,
    on 10g R2 on AIX
    in which table can I find the definition of a role ? I mean the script used to create it ?
    I can't recall there is any table that does stores it, I may not be knowing about it either but the dbms_metadata package should work fine as Osama mentioned,
    SQL> create role test;
    
    Role created.
    
    SQL> select dbms_metadata.get_ddl('ROLE','TEST') from dual;
    
    DBMS_METADATA.GET_DDL('ROLE','TEST')
    --------------------------------------------------------------------------------
    
       CREATE ROLE "TEST"
    HTH
    Aman....

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points