Solution for error: ORA-06564: object does not exist

background

When I imported an impdp(a.dmp) file to an idel instance,I encountered an error “ORA-06564: object X does not exist”
A portion of importing logs as shown in following.

Import: Release 11.2.0.4.0 – Production on Tue Nov 12 14:58:53 2019Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
;;;
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table “C”.”” successfully loaded/unloaded Starting “C”.”“: user2/ directory=DIRECTORY
dumpfile=a.dmp logfile=import.log
remap_schema=user1:user2 table_exists_action=replace full=y
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE:”C”.”D” failed to create with error:
ORA-06564: object X does not exist
Failing sql is:
CREATE TABLE “C”.”D” (“” NUMBER, “” NUMBER, “” NUMBER, “” NUMBER, “” VARCHAR2(20 BYTE), “” VARCHAR2(50 BYTE), “” VARCHAR2(20 BYTE), “” NUMBER, “*” VARCHAR2(20 BYTE), “CT
ORA-39083: Object type TABLE:”C”.”E” failed to create with error:
ORA-06564: object X does not exist

Cause

I have checked materials for the reason: “The named object could not be found. Either it does not exist or you do not have permission to access it.”

Solution

Create the object or get permission to access it. In this case you attempted to create an external table with a directory does not exist.
the solution is to issue the appropriate “create directory” command to create the missing directory.

SQL>select * from dba_directories where directory_name=’X’;
SQL>create or replace directory X as ‘/path1/path2/path3’;
SQL>quit
mkdir -p /path1/path2/path3
chown -R oracle:oinstall /path1/path2/path3

Leave a Reply