Oracle RDS UTL_FILE.FREMOVE cannot open file

0

How can I remove files from the Oracle RDS DATA_PUMP_DIR that fail when using the UTL_FILE.FREMOVE package?

e.g. SQL> EXEC UTL_FILE.FREMOVE('DATA_PUMP_DIR','test.dmp'); BEGIN UTL_FILE.FREMOVE('DATA_PUMP_DIR','test.dmp'); END;

ERROR at line 1: ORA-29283: invalid file operation: cannot open file [29435] ORA-06512: at "SYS.UTL_FILE", line 251 ORA-06512: at "SYS.UTL_FILE", line 1230 ORA-06512: at line 1

The dump file was copied to the DATA_PUMP_DIR using rdsadmin.rdsadmin_s3_tasks.download_from_s3 package with p_decompression_format => 'GZIP' parameter. The extracted dump file is readable by the Data Pump utilities but cannot be deleted by UTL_FILE.FREMOVE. This problem does not occur when using an uncompressed dump file in the S3 bucket.

e.g. SELECT rdsadmin.rdsadmin_s3_tasks.download_from_s3( p_bucket_name => 'oracle-rds-s3-test', p_s3_prefix => 'test.dmp.gz', p_directory_name => 'DATA_PUMP_DIR', p_decompression_format => 'GZIP') AS TASK_ID FROM DUAL;

Engine version: Oracle Standard Edition Two 19.0.0.0.ru-2022-01.rur-2022-01.r1

Any help is appreciated. Thank you.

JimmyG
gefragt vor 2 Jahren818 Aufrufe
4 Antworten
1

Thank you for reaching us. Prior reaching out to RDS Support Team I will also recommend to check if you are passing on the correct extension by listing all the files in data_pump_directory:

SELECT * FROM TABLE(rdsadmin.rds_file_util.listdir('DATA_PUMP_DIR')) ORDER BY MTIME;

[+] Importing using Oracle Data Pump - Step 6: Clean up - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Procedural.Importing.DataPump.html#Oracle.Procedural.Importing.DataPumpS3.Step6

If the file name provided in FREMOVE utility is correct then reaching out to Support should be right course of action

AWS
SUPPORT-TECHNIKER
Mano_S
beantwortet vor 2 Jahren
0

I would suggest reaching AWS support by creating Support case and provisioned RDS instance details, so internal teams can validate and remove those dump files.

profile pictureAWS
beantwortet vor 2 Jahren
0

Thank you for your responses. The filename (including extension) is correct and I have confirmed using rdsadmin.rds_file_util.listdir. When I intentionally use an incorrect filename the error returned changes from "cannot open file" to "nonexistent file or path". I assume the problem is an operating system file permission issue. As suggested I have opened a case with AWS Support. Thank you for your help.

JimmyG
beantwortet vor 2 Jahren
0

Did you get a response? I'm having the same issue.....

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen