在线等 OID用户添加进组
declare
ldap_host VARCHAR2(256);
ldap_port VARCHAR2(256);
ldap_user VARCHAR2(256);
ldap_passwd VARCHAR2(256);
userDN VARCHAR2(256);
newpwd VARCHAR2(256);
newmail VARCHAR2(256);
usename VARCHAR2(256);
retval number;
my_session DBMS_LDAP.session;
emp_dn VARCHAR2(256);
emp_array DBMS_LDAP.MOD_ARRAY;
group_array DBMS_LDAP.MOD_ARRAY;
emp_vals DBMS_LDAP.STRING_COLLECTION;
user_vals DBMS_LDAP.STRING_COLLECTION;
group_id varchar2(256):= 'cn=groups,dc=pec,dc=com,dc=cn ';
group_vals DBMS_LDAP.STRING_COLLECTION;
begin
retval := -1;
ldap_host := 'IP ';
ldap_port := '389 ';
ldap_user := 'cn=帐号 ';
ldap_passwd:= '密码 ';
group_array := DBMS_LDAP.create_mod_array(14);
emp_vals(1) := 'cn=营业所管理组,cn=groups,dc=1,dc=com,dc=cn ';
DBMS_LDAP.populate_mod_array (emp_array, DBMS_LDAP.MOD_ADD, 'orcldefaultprofilegroup ', emp_vals);
emp_vals.DELETE;
group_vals(1) := 'cn=maoyu1,cn=Users,dc=1,dc=com,dc=cn ';
DBMS_LDAP.populate_mod_array(group_array, DBMS_LDAP.MOD_ADD, 'uniquemember ', group_vals);
group_vals.DELETE;
retval := DBMS_LDAP.modify_s(my_session, 'cn=营业所管理组,cn=groups,dc=pec,dc=com,dc=cn ', group_array);
DBMS_LDAP.free_mod_array (group_array);
EXCEPTION when others then
DBMS_OUTPUT.put_line( 'Problems in setting up the Default Group: '||SQLERRM);
end;
将用户加入组 营业所管理组 怎么加不进去,有人懂的指点下吗
------解决方案--------------------我也不会顶下
------解决方案--------------------这么长,看看