I am trying to import data from .dmp file from AWS S3 to my RDS instance Oracle DB. I am able to download the file from S3 to my oracle directory DATA_PUMP_DIR. I am able to run the below script and able to view the dump file here.
SELECT * FROM TABLE (RDSADMIN.RDS_FILE_UTIL.LISTDIR(p_directory => 'DATA_PUMP_DIR'));
But when I try to import the data from this dump file I am getting error saying invalid arguments. What needs to be done?
The command I have used:
DECLARE
hdnl NUMBER;
BEGIN
hdnl := DBMS_DATAPUMP.OPEN(
operation => 'IMPORT',
job_mode => 'FULL',
job_name => null);
DBMS_DATAPUMP.ADD_FILE(
handle => hdnl,
filename => 'testDump.dmp',
directory => 'DATA_PUMP_DIR',
filetype => dbms_datapump.ku$_file_type_dump_file,
reusefile => 1
);
DBMS_DATAPUMP.ADD_FILE(
handle => hdnl,
filename => 'testDump.log',
directory => 'DATA_PUMP_DIR',
filetype => dbms_datapump.ku$_file_type_log_file);
DBMS_DATAPUMP.METADATA_FILTER(hdnl,'SCHEMA_EXPR','IN (''Test_SCHEMA'')');
DBMS_DATAPUMP.START_JOB(hdnl);
END;