Toad World® Forums

FTP from PL/SQL


#1

How to ftp files directly from pl/sql?
1.Install FTP package.
2. Try this example:
declare
l_conn UTL_TCP.connection;
ftp_host varchar2(15):=‘127.0.0.1’;
ftp_login varchar2(30):=‘USER’;
ftp_pass ftp_login%type:=‘PASS’;
ftp_remote_path varchar2(255):=’’;
ftp_local_path ftp_remote_path%type:=’’‘c:’’’;
v_directory varchar2(30):=‘TEST_FTP’;
begin
execute immediate 'create or replace directory ‘||v_directory||’ as '||ftp_local_path;
l_conn := ftp.login(ftp_host, ‘21’, ftp_login, ftp_pass);
ftp.binary(p_conn => l_conn);
ftp.put(l_conn,v_directory,‘filename’,ftp_remote_path||‘filename’);
ftp.logout(l_conn);
utl_tcp.close_all_connections;
end ;

Regards Piter


#2

Where is I can get FTP package?

Thanks, Yura


#3

Hi, i’m sure it was there in attachement, dissapeared???
Once again :slight_smile:
ftp.zip (3.47 KB)


#4

Where is I can get FTP package?

http://www.saferunescapegold.com/
Message was edited by: JAKEA

Message was edited by: JAKEA


#5

Look one message up.