2 Replies Latest reply: Nov 19, 2012 11:13 PM by Aman.... RSS

    role definition

    user522961
      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
           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....
            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....