How to query the permissions on an Oracle directory?

前端 未结 4 1028
遥遥无期
遥遥无期 2021-02-13 06:39

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:32

    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);
    

提交回复
热议问题