How to query the permissions on an Oracle directory?

前端 未结 4 1950
借酒劲吻你
借酒劲吻你 2021-02-13 06:59

I have a directory in all_directories, but I need to find out what permissions are associated with it, i.e. what has been granted on it?

4条回答
  •  天命终不由人
    2021-02-13 07:26

    You can see all the privileges for all directories wit the following

    SELECT *
    from all_tab_privs
    where table_name in
      (select directory_name 
       from dba_directories);
    

    The following gives you the sql statements to grant the privileges should you need to backup what you've done or something

    select 'Grant '||privilege||' on directory '||table_schema||'.'||table_name||' to '||grantee 
    from all_tab_privs 
    where table_name in (select directory_name from dba_directories);
    

提交回复
热议问题