ORA-24247: 网络访问被访问控制列表 (ACL) 拒绝
注意:需要在system用户下使用命令
需要先使用 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL 创建访问控制列表(ACL),
再使用 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL 将此 ACL 与邮件服务器相关联,
最后使用 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE 在此 ACL 为用户授与连接邮件服务器的权限。
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
acl => ‘email_server_permissions.xml‘,
description => ‘Enables network permissions for the e-mail server‘,
principal => ‘APPS‘,
is_grant => TRUE,
privilege => ‘connect‘);
END;
/
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl => ‘email_server_permissions.xml‘,
host => ‘123.125.50.132‘, --SMTP服务器地址
lower_port => 25,
upper_port => NULL);
COMMIT;
END;
/
--drop
BEGIN
DBMS_NETWORK_ACL_ADMIN.drop_acl(acl => ‘email_server_permissions.xml‘);
COMMIT;
END;
/
--查询
SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
SELECT acl,
principal,
privilege,
is_grant,
TO_CHAR(start_date, ‘DD-MON-YYYY‘) AS start_date,
TO_CHAR(end_date, ‘DD-MON-YYYY‘) AS end_date
FROM dba_network_acl_privileges;