Wikipedia

Search results

How to grant permission to directory ?

Directory privileges: READ and WRITE :

Eg: granting read on bfile_dir to userName

GRANT READ ON DIRECTORY bfile_dir TO userName;

You can see all the privileges for all directories with the following script
 
select
    *
from 
   all_tab_privs
where 
   table_name in
  (select 
      directory_name 
   from 
      dba_directories);
 

This script display directory privileges for a list of granted privileges:


set lines 110
 
col privilege format a12
col grantee   format  a25
col owner format  a25
 
select 
   p.grantee, p.privilege, p.owner, d.directory_name 
from 
   dba_tab_privs p,

    dba_directories d where    p.table_name=d.directory_name and    (grantee in ('xxx', 'yyy') or    grantee in (select granted_role from dba_role_privs


No comments:

Post a Comment