Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 700031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:27:08+00:00 2026-05-14T03:27:08+00:00

I’m currently trying to access Active Directory via the dbms_ldap API in Pl/Sql (Oracle).

  • 0

I’m currently trying to access Active Directory via the dbms_ldap API in Pl/Sql (Oracle). The trouble is that I’m not able to connect with my own username and password or anynoymously.

However, in C# I can connect anonymously with this code :

DirectoryEntry ldap = new DirectoryEntry("LDAP://Hostname");
DirectorySearcher searcher = new DirectorySearcher(ldap);
searcher.Filter = "(SAMAccountName=username)";
SearchResult result = searcher.FindOne();

If I try to connect anonymously in Oracle, I only get the error(ORA-31202 : LDAP client/server error) when I try to search (and the result code for the bind is SUCCESS)…

my_session := dbms_ldap.init('HOST','389');
retval := dbms_ldap.simple_bind_s(my_session, '', '');
retval := dbms_ldap.search_s(my_session, ldap_base,  dbms_ldap.scope_subtree, 'objectclass=*', my_attrs, 0, my_message);

Why is the anonymous connection is C# works but doesn’t work in Pl/Sql? Do you have any other idea to connect to Active Directory via Oracle?

Help me reunite them together.

Thanks.

Edit 1
When I bind with anonymous credentials I get :

ORA-31202: DBMS_LDAP: LDAP client/server error
00000000: LdapErr: DSID-0C090627,
comment: In order to perform this operation a successful bind must be completed on the >connection

And if I try to connect with my credentials, which are supposed to be valid since I’m connected to the domain with it… I get :

ORA-31202: DBMS_LDAP: LDAP client/server error
Invalid credentials
80090308: LdapErr: DSID-0C090334,
comment: AcceptSecurityContext error

Could it be possible that the Active Directory doesn’t allow external LDAP actions like these ones?

Edit 2
Taking a look at the ‘result’ variable, in C#, I get this value for the ‘Path’ property :
LDAP://SERVER_OR_DOMAIN/CN=LAST_NAME\,FIRST_NAME,OU=OU1,OU=OU2,OU=OU3,OU=OU4,DC=SERVER_NAME,DC=EXT1,DC=EXT2

Maybe with these info you can help me solve the issue, it might be possible that the AD doesn’t allow anonymous connection. Knowing the ‘Path’ propery, what would be the ‘ldap_base’, ‘ldap_user’ and ‘ldap_passwd’?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:27:08+00:00Added an answer on May 14, 2026 at 3:27 am

    Solved the problem after a hard day scratching my head for a few hours.

    AD doesn’t allow anonymous access by default. Therefore, I had to find the correct ‘ distinguishedName‘ in order to get access (which is the long string without the ‘LDAP://SERVER_OR_DOMAIN/’).

    If you ever encounter the ‘80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error’ error you should refer to this thread or this serverfault question.

    Thanks for the help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 387k
  • Answers 387k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assuming, you're not going to try to use the generated… May 15, 2026 at 12:14 am
  • Editorial Team
    Editorial Team added an answer Try putting quotation marks around the column name, i.e. "Name" May 15, 2026 at 12:14 am
  • Editorial Team
    Editorial Team added an answer If this is your exact markup, you can do this.… May 15, 2026 at 12:14 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.