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回答
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ