Oracle 11g ORA-24247:访问控制列表(ACL)拒绝的网络访问

时间:2012-03-27 12:10:37

标签: oracle oracle11g oracle10g ora-24247

我在链接http://www.oracle-base.com/articles/9i/ConsumingWebServices9i.php中使用soap_api。我能够在

中调用Web服务
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
"CORE   10.2.0.1.0  Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

但是当我在

中使用相同的内容时
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE   11.2.0.1.0  Production"
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

给予

"ORA-29273: HTTP request failed
 ORA-06512: at "SYS.UTL_HTTP", line 1130
 ORA-24247: network access denied by access control list (ACL)"

请帮忙

1 个答案:

答案 0 :(得分:0)

Oracle允许使用多个PL / SQL API(UTL_TCP,UTL_SMTP,UTL_MAIL,UTL_HTTP和UTL_INADDR)访问外部网络服务,所有这些都是使用TCP协议实现的。您需要为此创建一个ACL(访问控制列表)。在这种情况下,Bellow脚本可能对我有用。就我而言:我正在使用SYS.UTL_HTTP从pl / sql级别调用一个基于SOAP的Web服务。

begin
  dbms_network_acl_admin.create_acl (
  acl          => 'networkacl.xml',
  description  => 'Allow Network Connectivity',
  principal    => 'PUBLIC',
  is_grant     => TRUE,
  privilege    => 'connect',
  start_date   => SYSTIMESTAMP,
  end_date     => NULL);
 dbms_network_acl_admin.assign_acl (
  acl         => 'networkacl.xml',
  host        => 'AS NEEDED*',
  lower_port  => AS NEEDED*,
  upper_port  => AS NEEDED*);
  commit;
end;

您可以查看:here

  • AS NEEDED =根据您的要求定义自己