ORA-24247: 网络訪问被訪问控制列表 (ACL) 拒绝
注意:须要在system用户下使用命令
须要先使用 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL 创建訪问控制列表(ACL),
再使用 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL 将此 ACL 与邮件server相关联。
最后使用 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE 在此 ACL 为用户授与连接邮件server的权限。
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', --SMTPserver地址
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;
须要先使用 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL 创建訪问控制列表(ACL),
再使用 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL 将此 ACL 与邮件server相关联。
最后使用 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE 在此 ACL 为用户授与连接邮件server的权限。
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', --SMTPserver地址
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;