通过FTP发送时的ORA-24247 [英] ORA-24247 when sending through FTP

查看:156
本文介绍了通过FTP发送时的ORA-24247的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天来我一直在努力解决这个问题,而且我总是一遍又一遍地遇到相同的错误.我是Oracle SQL Developer版本3.2.20.09,我想使用此代码通过FTP发送文件

I've been trying to solve this problem for days and I always get the same error over and over. I am user Oracle SQL Developer Version 3.2.20.09 and I want to send files through FTP with this code

    CREATE OR REPLACE 
PROCEDURE subirFTP(dirServer VARCHAR2, port VARCHAR2, usr VARCHAR2, pass VARCHAR2, dirRemitente VARCHAR2, dirDestinatario VARCHAR2, nombreArchivo VARCHAR2)
IS
  l_conn  UTL_TCP.connection;
BEGIN
  l_conn := ftp.login(dirServer,port,usr,pass);
  ftp.binary(p_conn => l_conn);
  ftp.put(p_conn => l_conn,
          p_from_dir => dirRemitente,
          p_from_file => nombreArchivo,
          p_to_file => dirDestinatario);
  ftp.logout(l_conn);
END subirFTP;

Informe de error:
ORA-24247: acceso de red denegado por la lista de control de acceso (ACL)
ORA-06512: en "SYS.UTL_TCP", línea 17
ORA-06512: en "SYS.UTL_TCP", línea 267
ORA-06512: en "WORKFLOW.FTP", línea 76
ORA-06512: en "WORKFLOW.SUBIRFTP", línea 5
ORA-06512: en línea 2

推荐答案

由于ACL(访问控制列表)限制,此错误将在11g上引发.您需要将privs授予您的"WORKFLOW"用户才能与FTP服务器进行通信.

this error would be thown on 11g due to the ACL (access control list) restictions. you need to grant the privs to your "WORKFLOW" user to communicate with the FTP server.

您可以在

select * from dba_network_acls

您的dba可以通过以下方式授予访问权限:

your dba can grant access with something like:

begin
  dbms_network_acl_admin.create_acl(acl => 'ftp.xml',
                                    description => 'Enables FTP',
                                    principal => 'WORKFLOW', 
                                    is_grant => true,
                                    privilege => 'connect');
end;
/
begin
  dbms_network_acl_admin.assign_acl(acl => 'ftp.xml',
                                    host => 'yourhost.com',
                                    lower_port => ftp port);
end;
/
commit;

有关更多信息,请参见文档.

see the docs for more info.

这篇关于通过FTP发送时的ORA-24247的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆