标签:
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
acl => ‘email_server_permissions.xml‘,
description => ‘Enables network permissions for the e-mail server‘,
principal => ‘NC633‘, --此为将来要进行操作的用户
is_grant => TRUE,
privilege => ‘connect‘);
END;
/
--2. 将此 ACL 与邮件服务器相关联,
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl => ‘email_server_permissions.xml‘,
host => ‘10.10.0.200‘, --SMTP服务器地址
lower_port => 25,
upper_port => 25);
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;
标签:
原文地址:http://www.cnblogs.com/Snowfun/p/5577178.html