I try to transfer file to FTP via PL/SQL code.
I created UTL_FTP and FTP packages and its bodies(I found codes on internet for that) to transfer file I'm using code as bellow:
DECLARE
l_conn utl_tcp.connection;
BEGIN
l_conn := ftp.login('IP address','', 'User_name', 'Password',null);
ftp.ascii(p_conn => l_conn);
ftp.put(p_conn => l_conn,
p_from_dir => 'BANKA', --> This is an oracle directory
p_from_file => 'ACU_TEST.txt', --> I would like to transfer this file that under Oracle directory to FTP
p_to_file => '/BANKA'); --> This file under FTP address
ftp.logout(l_conn);
END;
/
END;
I'm getting error as:
ORA-04063: package body "SYSPROD.UTL_TCP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYSPROD.UTL_TCP"
ORA-06512: at "SYSPROD.FTP", line 84
ORA-06512: at line 4
I attached packages and its package bodies codes.
Any help would be appreciated.
Regards,
Gunce