0 Replies Latest reply on Jan 30, 2013 8:30 AM by bi_man

    ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials

      Im trying to configure my app with ad authentication. by searching on web i got many ideas. Im trying to execute below code but its fails when i assign a value to ldap_passwd* it throws an error saying

      ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials. 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db0

      with null its executes but it returns zero (0).

      where am i doing wrong?

      retval pls_integer;
      my_session dbms_ldap.session;
      ldap_host varchar2(256);
      ldap_port varchar2(256);
      ldap_user varchar2(256);
      ldap_passwd varchar2(256);

      ldap_host := 'ad_host' ;
      ldap_port := '389';
      ldap_user := 'cn=user';
      ldap_passwd:= null;

      my_session := dbms_ldap.init(ldap_host,ldap_port);
      retval := dbms_ldap.simple_bind_s(my_session,ldap_user, ldap_passwd);

      dbms_output.put_line(rpad('simple_bind_s Returns ',25,' ') || ': '|| to_char(retval));

      thank you.