Error ORA-39087: directory name <directory> is invalid when running URT or oracle datapump export
search cancel

Error ORA-39087: directory name <directory> is invalid when running URT or oracle datapump export

book

Article ID: 221824

calendar_today

Updated On:

Products

Data Loss Prevention Enterprise Suite Data Loss Prevention Oracle Standard Edition 2

Issue/Introduction

When running UpdateReadinessTool or expdp and impdp commands the following errors occur

ORA-39002: invalid operation

ORA-39070: Unable to open the log file.

ORA-39087: directory name <director> is invalid

Environment

Release :  16.0+

Cause

Issue can be two fold:

  1. It is likely a directory permission issue. Either the protect/readiness user is not granted read and write to that alias in oracle or the Oracle service account does not have correct permissions on the physical folder.

    An indicator of missing read and write permissions for the DB directory object, while the directory is actually configured in the database, can be found in the URT results. Right before running the Export (expdp) utility the URT tool will select and display the directory path in URT log one line above the "Export". If the path is returned it indicates that the DB directory, by default DATA_PUMP_DIR, is set in the database but the database user may not have the read and write permissions granted to it. If the URT fails on the Export command it indicates that it is the database user (by default protect) that does not have the correct permissions, if URT fails on Import (impdp) it indicates missing permissions for the readiness user.

    Note the URT tool will by default use the DATA_PUMP_DIR directory and the permissions need to be checked and adjusted for it. However if the URT tool is executed with "--data_pump" parameter, which allows to use a custom DB directory name, then the permissions to the provided directory need to be validated. The name of the directory to which the permissions are missing will be displayed in the URT ORA error in place of <directory> in the below example.

    Failing Export command, which indicates lacking permissions for the database user (protect):

    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Recyclebin purged.
    no rows selected
    no rows selected
    /example/directory
    Export: Release 19.0.0.0.0 - Production on Thu Oct 23 14:55:47 2025
    Version 19.27.0.0.0
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-39087: directory name <directory> is invalid



    Failing Import command, which points to lacking permissions for the readiness user:


    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Recyclebin purged.
    no rows selected
    no rows selected
    /example/directory
    ............
    Import: Release 19.0.0.0.0 - Production on Thu Nov 6 12:15:58 2025
    Version 19.3.0.0.0
    Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-39087: directory name <directory> is invalid

  2. Oracle 19c has a bug that does not support symbolic links for the data pump directory. Oracle unpublished bug 27598040.

 

 

 

Resolution

To Resolve the Permissions issue

 

Option 1 (recommended): Use preexisting DATA_PUMP_DIR link (requires that the steps from upgrade guide were previously ran)

If database and readiness users were created by following the DLP technical documentation both should by default have both read and write permissions to the DATA_PUMP_DIR directory.

 

Examples below:

java.exe UpdateReadinessTool --data_pump DATA_PUMP_DIR

atlernatively run URT without the --data_pump paramter as it will default to DATA_PUMP_DIR

or

expdp protect/Password@protect dumpfile=sandbox.dmp schemas=protect content=metadata_only directory=DATA_PUMP_DIR logfile=exp_sandbox.log reuse_dumpfiles=y exclude=grant

 

Option 2: Create a new Directory Link

Create a folder on the oracle server like c:\export or /export (Linux)

Make sure the Oracle Windows account has full permissions, or oracle account has read,write,execute for user, group in Linux.

Then open an admin cmd prompt:

sqlplus /nolog

conn sys/Password@protect as sysdba

CREATE DIRECTORY dbexport_for_dlp AS 'c:\export'

grant read,write on directory dbexport_for_dlp to protect;  *note also add your upgrade/readiness user

Then run URT with the --data_pump dbexport_for_dlp

java UpdateReadinessTool --data_pump dbexport_for_dlp

Linux:

Windows:

The dbexport_for_dlp can be named anything as its only for creating the datapump link to the physical folder.

 

To Resolve Symbolic Link Support

Open an admin cmd prompt:

sqlplus /nolog

conn sys/Password@protect as sysdba

ALTER SYSTEM SET "_disable_directory_link_check"=true SCOPE=SPFILE;

Restart the database and try URT again.