how to delete or cleanup DATA_PUMP_DIR in Oracle RDS

0

Hello , I am looking for solution on deleting multiple files at a time from Oracle RDS DATA_PUMP_DIR. I can see that more than 100 files present in one of my RDS DATA_PUMP_DIR and for cleanup activity we have delete it one by one with below sql as : exec utl_file.fremove('DATA_PUMP_DIR','file.log') ; is there any solution or script available with the help of that I can delete multiple files or cleanup complete DATA_PUMP_DIR please let me know.

已提問 1 年前檢視次數 3234 次
1 個回答
2
已接受的答案

Delete files in DATA_PUMP_DIR that you no longer require, use the following command.

EXEC UTL_FILE.FREMOVE('DATA_PUMP_DIR','filename');

To delete all files in DATA_PUMP_DIR, you could you something below..

begin for i in (select filename from table(RDSADMIN.RDS_FILE_UTIL.LISTDIR('MY_DIR')) where type='file') loop UTL_FILE.FREMOVE ('DATA_PUMP_DIR', i.filename); end loop; end; /

Please test the script/procedure in non-production before moving on to production and acknowledge the answer.

AWS
awsrams
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南