Link to home
Start Free TrialLog in
Avatar of hiranya
hiranya

asked on

File transfer using PL/SQL Procedure



Hi.

 I need to transfer set of files  (txt,rpt etc..) from one server to other using a Oracle PL/SQL procedure/function. Using FTP.GET function we can transfer files one by one and also we have to give the file names as a parameter. How can we do this if we don't know the file names and we need to transfer all the file in a folder. Please help.


Regards.  
Avatar of MohanKNair
MohanKNair

Oracle PL/SQL procedure/function cannot transfer files. Oracle installed in two servers can communicate using a DB LINK. It is not possible to transfer LOB fields over a db link.

The best option for transfering a complete folder is to ZIP the entrire folder to a single file or using tar compress the folder to a tar file. FTP the zipped file and unzip the file at other server.
Avatar of Acton Wang
to MohankNair: It is possible to transfer files using FTP between servers. There are some existing packages out there to do this.
>> How can we do this if we don't know the file names
     There is no direct function in PL/SQL to do this. The workaround can be that you can have a file in that folder to describe which files in the folder.
     
ASKER CERTIFIED SOLUTION
Avatar of ram_0218
ram_0218
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ofcourse the copyright is to:-

http://www.oracle-base.com/articles/9i/FTPFromPLSQL9i.php

let us know if anything doesnt work. We'll be glad to solve it.