Wednesday, February 23, 2011

ORA-24247: network access denied by access control list (ACL)

A developer encountered following errors today in one of our 11.2.0.2 single instance database (OEL 5.5):
SQL> exec pakage-name(12345678,3885);
BEGIN express6genoutput(12345678,3885); END;

*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1527
ORA-29261: bad argument
ORA-06512: at "user1.pakage-name", line 22
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 1 

Based on this Metalink note: ORA-24247 Using UTL_TCP, UTL_HTTP, UTL_SMTP and UTL_MAIL with11gR1 or Later [ID 1209644.1], I fixed this problem after executing following commands:
Note:
1 I replaced the "SCOTT" with the username in my database that is having this kind of error.
2 Before I executing those commands, I did "find / -name network_service.xml" as root user, which returned nothing, so I didn't uncomment the 2nd comment.

BEGIN

  -- Only uncomment the following line if ACL "network_services.xml" has already been created
  --DBMS_NETWORK_ACL_ADMIN.DROP_ACL('network_service.xml');

  DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(
    acl => 'network_services.xml',
    description => 'FTP ACL',
    principal => 'SCOTT',
    is_grant => true,
    privilege => 'connect');

  DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
    acl => 'network_services.xml',
    principal => 'SCOTT',
    is_grant => true,
    privilege => 'resolve');

  DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(
    acl => 'network_services.xml',
    host => '*');

  COMMIT;

END;

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home