I got ” ORA-39006: Internal error ” error in Oracle database.
ORA-39006: Internal error
Details of error are as follows.
ORA-39006: Internal error. Cause: An unexpected error occurred while processing a Data Pump job. Subsequent messages supplied by DBMS_DATAPUMP.GET_STATUS will further describe the error. Action: Contact Oracle Customer Support.
When dbms_datapump.add_file is called by command line export or datapump API, it fails with: ORA-39006: internal error ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DATAPUMP", line 3507 ORA-06512: at "SYS.DBMS_DATAPUMP", line 3756 ORA-06512: at line 11 In this example, the errors occurred after removing the Streams configuration and moving the database to no archivelog mode. Running catproc.sql does not solve the issue. This error may be raised for various exports in command line and with the Datapump API.
Internal error
This ORA-39006 error is related with the unexpected error occurred while processing a Data Pump job. Subsequent messages supplied by DBMS_DATAPUMP.GET_STATUS will further describe the error.
It is likely that the Datapump structures became corrupted after the uninstall of Streams.
The issue was an
Error stack trace level 3 showed it happens for
BEGIN
SYS.DBMS_DATAPUMP.ADD_FILE(handle => :JOBHNDL, filename => :FILENAME, directory => :DIRECTORY, filesize => :FILESIZE, filetype => :FILETYPE, reusefile => :REUSEFILE);
END;
To solve this error, Run catupgrd.sql:
$sqlplus "/as sysdba" SQL> spool <spool_file_name>.txt SQL> startup upgrade SQL> @?/rdbms/admin/catupgrd.sql - run utlrp few times to validate the invalid objects SQL> @?/rdbms/admin/utlrp.sql SQL> @?/rdbms/admin/utlrp.sql SQL> spool off
Another case is as follows.
1. IMPDP fails with following error while importing a schema:
Import: Release 11.2.0.1.0 - Production on Fri May 2 22:17:48 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options Legacy Mode Active due to the following parameters: Legacy Mode Parameter: "log=<LOGFILE>.log" Location: Command Line, Replaced with: "logfile=<LOGFILE>.log" ORA-39006: internal error
2. Alert log shows error:
ORA-07445: exception encountered: core dump [strlen()+80] [SIGSEGV] [ADDR:0x0] [PC:0xFFFFFFFF7A93C830] [Address not mapped to object] []
Call stack:
3. Running IMPDP with SQLFILE option also fails with same internal error.
Problem in export dump file as import with SQLFILE option is not able to read the dump file.
Restore the schema from the back up, perform a new export, then perform the import using the new export dump.
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )