Oracle Directory

Create Directory

CREATE OR REPLACE DIRECTORY MY_LOG_DIR AS '/opt/oracle/dataload/logs';

List All My Directories

col OWNER format a9
col DIRECTORY_NAME format a9
col DIRECTORY_PATH format a29
 
SELECT * FROM all_directories WHERE directory_name LIKE 'MY%';

Grant Access to Directory

GRANT READ ON DIRECTORY MY_LOG_DIR TO dev;
GRANT WRITE ON DIRECTORY MY_LOG_DIR TO dev;

List Grantees of a Directory

col grantor format a9
col grantee format a9
col table_schema format a9
col TABLE_NAME format a9
col privilege format a9
 
SELECT grantor, grantee, table_schema, TABLE_NAME, privilege
FROM all_tab_privs 
WHERE TABLE_NAME='MY_LOG_DIR';
This entry was posted in oracle and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.