需要在oracle中执行下面:
--1.创建访问控制列表(ACLemail_server_permissions),
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
acl => 'ldap_server_permissions.xml',
description => 'Enables network permissions for the ldap server',
principal => 'RBAC', --此为将来要进行操作的用户
is_grant => TRUE,
privilege => 'connect');
END;
/
--2. 将此 ACL 与邮件服务器相关联,
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl => 'ldap_server_permissions.xml',
host => '192.168.1.68', --LDAP服务器地址
lower_port => 389,
upper_port => 389);
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;
begin
dbms_network_acl_admin.drop_acl('/sys/acls/network_services.xml');
dbms_network_acl_admin.drop_acl('/sys/acls/ldap_server_permissions.xml');
commit;
end;