ORA-31631 During Export Using DataPump API
(Doc ID 1053432.1)
Last updated on AUGUST 01, 2019
Applies to:Oracle Database - Enterprise Edition - Version 10.1.0.2 to 18.104.22.168 [Release 10.1 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 18-APR-2013***
NOTE: In the document content below, the user information and data used represents fictitious data .Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
You created a user (ASDBA) and granted the roles CONNECT, RESOURCE, EXP_FULL_DATABASE and IMP_FULL_DATABASE to that user.
Then, as user ASDBA, you created the following procedure that uses DataPump API to export different database objects (in my example a schema):
d1 := dbms_datapump.open ('EXPORT', 'SCHEMA');
dbms_datapump.add_file (d1, 'test.dmp', 'DPU');
dbms_datapump.add_file (d1, 'test.log', 'DPU', NULL, DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
dbms_datapump.metadata_filter (d1, 'SCHEMA_EXPR', 'IN (''TEST'')');
When you start the procedure, the following errors are raised:
BEGIN myexp; END;
ERROR at line 1:
ORA-31631: privileges are required
ORA-06512: at "SYS.KUPF$FILE", line 7266
ORA-06512: at "SYS.KUPP$PROC", line 644
ORA-06512: at "SYS.DBMS_DATAPUMP", line 1032
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4631
ORA-06512: at "ASDBA.MYEXP", line 5
ORA-06512: at line 1
The errors occur during the call to DBMS_DATAPUMP.OPEN.
You newly set the event:
to trace the DM/DW processes.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document