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

Error ORA-39087: directory name <directory> is invalid when performing oracle datapump export

book

Article ID: 221824

calendar_today

Updated On:

Products

Data Loss Prevention Enterprise Suite

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 G:\ORACLE is invalid

Environment

Release : 15.x, 16.x

Cause

Issue can be two fold:

1.) It is likely a file permission issue. Either the protect 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.

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: 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 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 whatever the customer wants its only for creating the datapump link to the physical folder.

 

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

Examples below:

java.exe UpdateReadinessTool --data_pump 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

 

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.