Thanks for the question, Saptadip.
Asked: June 12, 2018 - 8:06 pm UTC
Last updated: June 15, 2018 - 5:37 am UTC
Version: 11.2.0.4
Viewed 1000+ times
You Asked
Hi
I am using Datapump to export dump file from a database and while exporting the dumpfile, I am splitting that dumpfile into multiple files. Now I want to transfer those files to another server using DBMS_FILE_TRANSFER.PUT_FILE.
I know I can explicitly mention the file names in "source_file_name" but not want do that way as the file names can be different sometime.
So thinking if there is any way to put source_file_name values without bothering typing the hardcoded values.
Any help would be appreciated.
Regards,
Saptadip
and Connor said...
Perhaps approach this a different way. You can use an external table definition to be able to perform a direcctory listing of the file(s) in a particular folder.
There's a demo of that here
http://www.oracle-developer.net/display.php?id=513 So then your process would be:
for i in ( select file_name from my_external_table )
loop
DBMS_FILE_TRANSFER.PUT_FILE(..., i.file_name, .... )
end loop;
Is this answer out of date? If it is, please let us know via a Comment