CREATE DIRECTORY IN ORACLE DATABASE
Its often required to create a logical directory in database for extracting the data dumps to physical filesystem directory
First thing to do is to check if the directory exists on filesystem and has proper permissions like read,write,execute and ownership of oracle user and oinstall or dba group
SQL> !ls -lrt /home/oracle
total 541840
drwxrwxr-x. 4 oracle oinstall 74 Dec 13 2020 oraInventory
-rwxrwxrwx 1 oracle oinstall 187 Dec 13 2020 rman_duplicate_bkpset.sh
-rw-r--r-- 1 oracle oinstall 2899 Dec 13 2020 rmandup.log
-rw-r--r-- 1 oracle oinstall 321 Dec 17 2020 5m.log
Check if the directory exist logically on the database
SQL> select * from dba_directories;
Create logical directory like this
SQL> create directory exp as '/home/oracle';
Directory created.
Atlast verify the same
SQL> select directory_name,directory_path from dba_directories where directory_name='EXP';
DIRECTORY_NAME
--------------------------------------------------------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
EXP
/home/oracle