Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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: "Error 3021 No Record Found"


View products that this article applies to.

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: Date
Time: Time
Computer: 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: Date
Time: Time
Computer: 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: Date
Time: Time
Computer: 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: Date
Time: Time
Computer: 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: Date
Time: Time
Computer: Computer
Description:
Internal event: Function ldap_search completed with an elapsed time of Number 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 "AND" clauses and "OR" clauses.
Note The same query runs successfully if you bind to a Microsoft Windows 2000-based domain controller.

↑ Back to the top


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 "AND" clauses and "OR" clauses. If the LDAP filter contains many "AND" clauses and "OR" clauses, this optimization requires lots of memory. Therefore, the optimization fails.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

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 2, x86-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirement
Ntdsa.dll5.2.3790.41061,525,24827-Jun-200708:54x86SP2
W03a2409.dll5.2.3790.4106453,63226-Jun-200711:25x86SP2
Windows Server 2003 with Service Pack 2, x64-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Ntdsa.dll5.2.3790.41062,969,60026-Jun-200722:54x64SP2Not Applicable
W03a2409.dll5.2.3790.4082454,14426-Jun-200722:54x64SP2Not Applicable
Wntdsa.dll5.2.3790.41061,525,24826-Jun-200722:54x86SP2WOW
Ww03a2409.dll5.2.3790.4106453,63226-Jun-200722:54x86SP2WOW
Windows Server 2003 with Service Pack 2, Itanium-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Ntdsa.dll5.2.3790.41064,259,32826-Jun-200722:50IA-64SP2Not Applicable
W03a2409.dll5.2.3790.4082452,60826-Jun-200722:50IA-64SP2Not Applicable
Wntdsa.dll5.2.3790.41061,525,24826-Jun-200722:50x86SP2WOW
Ww03a2409.dll5.2.3790.4106453,63226-Jun-200722:50x86SP2WOW
Windows Server 2003 with Service Pack 1, x86-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirement
Ntdsa.dll5.2.3790.29621,524,22427-Jun-200712:18x86SP1
W03a2409.dll5.2.3790.295728,67219-Jun-200707:30x86SP1
Windows Server 2003, x64-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Ntdsa.dll5.2.3790.29622,968,06426-Jun-200722:50x64SP1Not Applicable
W03a2409.dll5.2.3790.295729,18426-Jun-200722:50x64SP1Not Applicable
Wntdsa.dll5.2.3790.29621,524,22426-Jun-200722:50x86SP1WOW
Ww03a2409.dll5.2.3790.295728,67226-Jun-200722:50x86SP1WOW
Windows Server 2003 with Service Pack 1, Itanium-based versions
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
Ntdsa.dll5.2.3790.29624,257,28026-Jun-200722:49IA-64SP1Not Applicable
W03a2409.dll5.2.3790.295727,64826-Jun-200722:49IA-64SP1Not Applicable
Wntdsa.dll5.2.3790.29621,524,22426-Jun-200722:49x86SP1WOW
Ww03a2409.dll5.2.3790.295728,67226-Jun-200722:49x86SP1WOW

↑ Back to the top


Workaround

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

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

To log the events that are mentioned in the "Symptoms" section in the Directory Service log, you must configure Active Directory diagnostic event logging on the domain controller. To do this, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics
  3. In the details pane, right-click the 16 LDAP Interface Events entry, and then click Modify.
  4. In the Value data box, type 3, and then click OK.
  5. Exit Registry Editor.
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:
824684� Description of the standard terminology that is used to describe Microsoft software updates

↑ Back to the top


Keywords: kbautohotfix, kberrmsg, kbexpertiseinter, kbwinserv2003postsp2fix, kbbug, kbfix, kbqfe, KB934407

↑ Back to the top

Article Info
Article ID : 934407
Revision : 2
Created on : 10/8/2011
Published on : 10/8/2011
Exists online : False
Views : 549