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 年前3233 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则