Microsoft KB Archive/934407

= Error message when you run an LDAP script that queries for Active Directory information after you bind to a Windows Server 2003-based domain controller: &quot;Error 3021 No Record Found&quot; =

Article ID: 934407

Article Last Modified on 10/11/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard x64 Edition
 * Microsoft Windows Server 2003, Enterprise x64 Edition
 * Microsoft Windows Server 2003, Datacenter x64 Edition
 * Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
 * Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems

-



SYMPTOMS
After you bind to a Microsoft Windows Server 2003-based domain controller, you run a Lightweight Directory Access Protocol (LDAP) script to query for information in the Active Directory directory service. However, the query fails, and you receive the following error message on the LDAP client:

Error 3021 No Record Found

Additionally, the following events are logged in the Directory Service log on the domain controller.

Event ID: 1138 Event Type: Information

Event Source: NTDS LDAP

Event Category: LDAP Interface

Event ID: 1138

Date:

Time:

Computer:

Description:

Internal event: Function ldap_search entered.

Event ID: 1173 Event Type: Warning

Event Source: NTDS General

Event Category: Internal Processing

Event ID: 1173

Date:

Time:

Computer:

Description:

Internal event: Active Directory has encountered the following exception and associated parameters.

Exception:e0010003

Parameter:0

Additional Data

Error value:0

Internal ID:2101c64

Event ID: 1481 Event Type: Error

Event Source: NTDS General

Event Category: Internal Processing

Event ID: 1481

Date:

Time:

Computer:

Description:

Internal error: The operation on the object failed.

Additional Data

Error value:

7 00000008: SysErr: DSID-00000000, problem 12 (Not enough space), data 8446

Event ID: 1535

Event Type: Information

Event Source: NTDS LDAP

Event Category: LDAP Interface

Event ID: 1535

Date:

Time:

Computer:

Description:

Internal event: The LDAP server returned an error.

Additional Data

Error value: 00000008: SysErr: DSID-00000000, problem 12 (Not enough space), data 8446

Event ID: 1139 Event Type: Information

Event Source: NTDS LDAP

Event Category: LDAP Interface

Event ID: 1139

Date:

Time:

Computer:

Description:

Internal event: Function ldap_search completed with an elapsed time of  ms.

This problem occurs if the following conditions are true:
 * The LDAP script contains an LDAP filter.
 * The LDAP filter is very long and contains many &quot;AND&quot; clauses and &quot;OR&quot; clauses.

Note The same query runs successfully if you bind to a Microsoft Windows 2000-based domain controller.



CAUSE
This problem occurs because Windows Server 2003 introduced an optimizer for LDAP filters. The optimizer analyzes the LDAP filter that is sent to the domain controller. Then, the optimizer tries to remove redundant &quot;AND&quot; clauses and &quot;OR&quot; clauses. If the LDAP filter contains many &quot;AND&quot; clauses and &quot;OR&quot; clauses, this optimization requires lots of memory. Therefore, the optimization fails.



Hotfix information
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows Server 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites
To apply this hotfix, you must have Windows Server 2003 Service Pack 1 or Windows Server 2003 Service Pack 2 installed. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

889100 How to obtain the latest service pack for Windows Server 2003

Restart requirement
You must restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Windows Server 2003 with Service Pack 1, Itanium-based versions


WORKAROUND
To work around this problem, use a smaller LDAP filter in the LDAP script.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
To log the events that are mentioned in the &quot;Symptoms&quot; section in the Directory Service log, you must configure Active Directory diagnostic event logging on the domain controller. To do this, follow these steps:  Click Start, click Run, type regedit, and then click OK. Locate and then click the following registry subkey:

 In the details pane, right-click the 16 LDAP Interface Events entry, and then click Modify. In the Value data box, type 3, and then click OK. Exit Registry Editor.</li></ol>

For more information about how to configure Active Directory diagnostic event logging, click the following article number to view the article in the Microsoft Knowledge Base:

314980 How to configure Active Directory diagnostic event logging in Windows Server 2003 and in Windows 2000 Server

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kberrmsg kbbug kbfix kbqfe kbpubtypekc kbexpertiseinter kbhotfixserver kbwinserv2003postsp2fix KB934407

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.