oracle 配置 ACL 使用数据库发送WebServic请求时需要

BEGIN
  dbms_network_acl_admin.create_acl( acl => '随便起的名字.xml',
                                     description => '注释',
                                     principal => '数据库名字',  --数据库用户名
                                     is_grant => TRUE,--是否赋权
                                     privilege => 'connect');

  dbms_network_acl_admin.assign_acl(acl  => 'cmsToEsbService.xml',
                                    host => '访问的wsdl地址的域名',
                                    lower_port  => '端口(可不写)',
                                    upper_port  => '端口(可不写)');                                
END;


--删除ACL权限
BEGIN
  DBMS_NETWORK_ACL_ADMIN.drop_acl(acl => '随便起的名字.xml');
END;

--查询ACL
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;
 

 

posted @ 2018-11-22 15:19  徘徊在人间的水墨  阅读(485)  评论(0编辑  收藏  举报