oracle: how to create directory and grant permissions to users

0
(0)

Create & grant permission to directory in Oracle

Create directory in Oracle Database

SQL> Create directory dir_name as 'D:dumps';

Grant read write permission to Directory:

--grant read permission
SQL> GRANT read on DIRECTORY dir_name to user_name;
--grant write permission
SQL> GRANT write on DIRECTORY dir_name to user_name;
-- grant both
SQL> GRANT READ,WRITE ON DIRECTORY dir_Name TO user_Name;

Revoke permission from directory

-- revoke read permission
SQL> REVOKE read on DIRECTORY dir_name FROM User_Name;
-- revoke write permission
SQL> REVOKE write on DIRECTORY dir_name FROM User_Name;
-- revoke both
SQL> REVOKE read,write on Directory dir_name from user_name;

Modify path of directory

SQL> create or replace directory dir_name as 'D:';
Directory created.
SQL> create or replace directory dir_name as 'D:scripts';
Directory created.

Drop the directory

SQL> DROP Directory dir_name;

Similar Posts:

2,632

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Leave a Comment

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

Scroll to Top