Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

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/

Therefore we created the logical directory at OS & Database level, now we can perform all the export and import operation by using the directory.

=====Hence tested and verified in our test env=====

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>