码迷,mamicode.com
首页 > 数据库 > 详细

Oracle发邮件,权限问题

时间:2015-07-01 17:24:22      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

-- 创建 ACL

BEGIN

DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => ‘email_server_permissions.xml‘,

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.xml‘,

host => ‘smtp.163.com‘,

lower_port => 25,

upper_port => NULL);

END;

-- 这样 email_user 用户帐户创建的存储过程便可以向此邮件服务器发送邮件

?

--删除

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;

Oracle发邮件,权限问题

标签:

原文地址:http://www.cnblogs.com/mellowsmile/p/4613405.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!