How to create a logical directory in Oracle Database 19C for Export & Import (expdp/impdp)
Posted by Mir Sayeed Hassan on November 13th, 2024
How to create a logical directory in Oracle Database 19C for Export & Import (expdp/impdp)
Check the database version
SYS> select name, status, open_mode, version from V$database, v$instance; NAME STATUS OPEN_MODE VERSION ---------------------------------------------------- ORA19CDB OPEN READ WRITE 19.0.0.0.0
Login to the Oracle Linux Server & Create a OS Level directory
[oracle@ora19cdb ~]$ mkdir -p /u02/backup/dump_bkp/
Provide the appropriate permission for the directory
[oracle@ora19cdb ~]$ chown oracle:oinstall /u02/backup/dump_bkp/
Login to the database & create the logical directory and assign the physical OS directory path
SYS> create or replace directory dump_bkp as '/u02/backup/dump_bkp/'; Directory created.
SYS> grant read, write on directory dump_bkp to system; Grant succeeded.
If you wish to grant read, write permission to other user like “HASSAN”, Issue below query
SYS> grant read, write on directory dump_bkp to hassan; Grant succeeded.
Verify the directory created in database
SYS> col owner for a10 SYS> col directory_name for a20 SYS> col directory_path for a40 SYS> select owner, directory_name, directory_path from dba_directories where directory_name='DUMP_BKP'; OWNER DIRECTORY_NAME DIRECTORY_PATH ----------------------------------------------------- SYS DUMP_BKP /u02/backup/dump_bkp/