Page Banner

AWS RDS Oracle import fails with ORA-06512

Recently I encountered an issue while importing schema to AWS RDS Oracle.  Where the size of the export dump file is approx 1.8 GB.  Import failed with the following error:

SQL> Connected.
SQL> SQL> SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 DECLARE
*
ERROR at line 1:
ORA-39001: invalid argument value
ORA-06512: at “SYS.DBMS_SYS_ERROR”, line 79
ORA-06512: at “SYS.DBMS_DATAPUMP”, line 4932
ORA-06512: at “SYS.DBMS_DATAPUMP”, line 5183
ORA-06512: at line 16

Resolution:

a. Check the copy task from S3 Bucket to DB Directory is completed successfully:

SQL> SELECT text FROM table(rdsadmin.rds_file_util.read_text_file(‘BDUMP’,’dbtask-<task-id>.log’));

           You should see - task finished successfully.

b. Check if your export dump files are properly copied

SQL> select * from table(rdsadmin.rds_file_util.listdir(p_directory => ‘DATA_PUMP_DIR’));

Validating the above steps should help you identify the missing or partially copied files.  Above issue often happens whe you run impdp without completly coping the files.