ora-24247 :網路訪問被訪問控制列表(ACL)拒絕

yangzhangyue發表於2013-07-29
背景:
資料庫由10.2.0.4升級到11.2.0.3.6後傳送郵件報錯。

原因:
      For database users upgrading to Oracle Database 11g Release 1 (11.1), applications that depend on the PL/SQL network utility packages compile without any issues. However, at runtime the applications might receive exceptions when attempting to perform. privileged network operations
     (當oracle資料庫升級到11.1之後,應用程式依賴於PL / SQL網路實用程式包編譯沒有任何問題。然而,在執行時,應用程式可能會收到異常當試圖執行特權網路操作)
      主要是一下幾個包
     Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE
  • UTL_TCP
  • UTL_HTTP
  • UTL_SMTP
  • UTL_MAIL
  •   現象:
    Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONEORA-24247: network access denied by access control list (ACL)解決方法:
        使用dba賬戶使用下面指令碼授予報錯賬戶訪問外部網路服務,以SCOTT為例:

       Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONEBEGIN

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

      DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(
        acl => 'network_services.xml',
        description => 'NETWORK 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;

    來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29033984/viewspace-767383/,如需轉載,請註明出處,否則將追究法律責任。

    相關文章