Oracle发邮件,权限问题
2015-07-01
0
-- 创建ACL
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl =>'email_server_permissions.,
description=>'Enables network permissions for the e-mail server',
principal =>'LJZ',
is_grant =>TRUE,
privilege=>'connect');
END;
-- 与邮件服务关联
BEGIN
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl =>'email_server_permissions.,
host =>'smtp.163.com',
lower_port =>25,
upper_port =>NULL);
END;
-- 这样 email_user 用户帐户创建的存储过程便可以向此邮件服务器发送邮件
--删除
BEGIN
DBMS_NETWORK_ACL_ADMIN.drop_acl(acl =>'email_server_permissions.);
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.shaoqun.com/m/a/122592.html
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:admin@shaoqun.com。
0