数据库由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
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;