Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL Send File to FTP

gkayaJan 17 2016 — edited Jan 20 2016

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2016
Added on Jan 17 2016
9 comments
3,523 views