How to Find Directory Object in Oracle?

You can find the directory objects in Oracle using data dictionary view DBA_DIRECTORIES and ALL_DIRECTORIES. The following are the examples.

Find Directory Objects in Oracle

In the following example, we will find the directories using DBA_DIRECTORIES view.

To List all the directories:

SELECT * FROM dba_directories;

To Find a particular directory:

FROM dba_directories
WHERE directory_name = 'EMAIL_FILES';

List all the directories for which you have the privileges.

FROM dba_directories a
FROM all_tab_privs
WHERE table_name = a.directory_name AND grantee = USER);

Note: In the above query, you can change the USER with a username in quotes, e.g. ('SCOTT') to find for a particular user.

Sample Output:

find directories in Oracle
Oracle Directory List

See also:

Written by Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of and a question and answer forum for developers. You can connect with me on Facebook and Twitter.

Leave a Reply

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