Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2008 R2 / Windows.edb File Too Big – How to Reduce Size

October 5, 2017 Windows Server 2008 R2Windows Server 2012 R2

Windows.edb File Too Big – How to Reduce Size

Windows.edb is an index database of Windows Search service, which provides faster search of data in the file system due to indexing of files, e-mails in PST files and other content. Obviously, the more files there are in the system, the larger is Windows.edb. In some cases, it can grow to tens or even hundreds of GB, taking up all the free space on the system disk.

This file is hidden and by default stored in the folder C:\ProgramData\Microsoft\Search\Data\Applications\Windows\.

Note. This file can be found in all modern client and server Microsoft OSs: from Windows 7/Vista/Server 2008 to Windows 10/Server 2016.

For example, in my case the size of Windows.edb is more than 15.5 GB (i. e. over 15% on my 100 GB SSD drive).

huge Windows.edb file

There are several ways to manage Windows.edb growth

Contents:
  • Rebuilding Windows Search Index
  • Windows.edb Defragmentation Using Esentutl
  • Delete and Recreate the Windows.edb file
  • Move Windows.edb File to Another Drive
  • Fix to Prevent Excessive Windows.edb Growth in Windows 8 / Windows Server 2012

Rebuilding Windows Search Index

The most appropriate, though not too effective, way to reduce the size of Windows.edb is to re-index the files in the system. To do it, open Control Panel -> Indexing Options -> Advanced -> Rebuild (to open this dialog box, you can run the following command: rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll

rebuild windows search index

In some time (as a rule, it takes quite a long time), the system will finish data re-indexing, and the size of the EDB file will be reduced.

Windows.edb Defragmentation Using Esentutl

Since the index file of Windows Search service is a database in the EDB format, you can run its defragmentation using a standard utility for this type of databases, esentutl.exe — Extensible Storage Engine Utilities (Exchange administrators should be familiar with it).The database is defragmented offline (it must not be used), so you will have to stop Widows Search first. You can join all these operations in a single script:

sc config wsearch start=disabled
sc stop wsearch
esentutl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb
sc config wsearch start=delayed-auto
sc start wsearch

Tip. To perform the defragmentation, there should be sufficient free space on the hard drive, since a copy of the EDB file will be created.

Esentutl displays the defragmentation progress on the screen.

Note. If you see the error: Operation terminated with error -1213 (JET_errPageSizeMismatch, The database page size does not match the engine) after 10.125 seconds, after you run esentutl command, it means that you use 64-bit system and to perform defragmentation you need a 64-bit esentutl version. So the third command has to be as follows: "C:\Windows\SysWOW64\esentutl.exe" /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb

defrag Windows-edb with esentutl

In my case, after the defragmentation the size of the EDB file reduced by 30%.

Delete and Recreate the Windows.edb file

If there is too little free space on your disk, you can safely delete Windows.edb. To do it, stop Windows Search and delete the file.

net stop "Windows Search"
del %PROGRAMDATA%\Microsoft\Search\Data\Applications\Windows\Windows.edb
net start "Windows Search"

After you restart Windows Search, it will start system re-indexation and recreate the Windows.edb file (in the process of full reindexing, system performance may decrease).

Move Windows.edb File to Another Drive

In some cases, when the size of Windows.edb file is constantly growing, it is better to move the index database of Windows Search to another volume. Thus, the extreme growth of the database won’t result in stopping the system when the system space is exhausted. As a rule, you should do it on RDS servers, where users actively work with files, personal folders and other indexed content.

To change the file location, open Control Panel\Indexing Options\Advanced\ Index location->New Location and specify the path to the new location of Windows.edb file.

move search index file

Fix to Prevent Excessive Windows.edb Growth in Windows 8 / Windows Server 2012

To solve the problem of the constant growth of Windows.edb file in Windows 8 and Windows Server 2012, a special fix was issued that was included in the update package of May, 2013 – KB 2836988. It is recommended to download and install it for these Windows versions.

2 comments
0
Facebook Twitter Google + Pinterest
previous post
How to Disable SMB 1.0 in Windows 10 / Server 2016
next post
Recovering Files from a RAW Partition using TestDisk

Related Reading

Slow Network Shared Folder Refresh on Windows Server

February 28, 2019

Integrating Windows Updates into Windows 10 Install Image

February 12, 2019

Copying Large Files over an Unreliable Network Using...

February 11, 2019

How to Install & Configure WSUS on Windows...

March 5, 2019

Copying Approved Updates Between WSUS Target Groups

March 1, 2019

Slow Network Shared Folder Refresh on Windows Server

February 28, 2019

Integrating Windows Updates into Windows 10 Install Image

February 12, 2019

Copying Large Files over an Unreliable Network Using...

February 11, 2019

How to Install & Configure WSUS on Windows...

March 5, 2019

Copying Approved Updates Between WSUS Target Groups

March 1, 2019

Slow Network Shared Folder Refresh on Windows Server

February 28, 2019

2 comments

Kimi January 8, 2019 - 3:24 am

This issue is not only related to Win8 and 2012.

It also happened with Win 10. very terrible.

Reply
William February 7, 2019 - 3:25 pm

This is exactly what I was looking for. Thanks for your help!

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • How to Install & Configure WSUS on Windows Server 2012 R2 / 2016

    March 5, 2019
  • Windows 10 Upgrade Error: Windows Might be Installed in Unsupported Directory

    March 1, 2019
  • Copying Approved Updates Between WSUS Target Groups

    March 1, 2019
  • Slow Network Shared Folder Refresh on Windows Server

    February 28, 2019
  • ESXi: Slow Disk Performance on HPE Gen8

    February 15, 2019
  • Integrating Windows Updates into Windows 10 Install Image

    February 12, 2019
  • Copying Large Files over an Unreliable Network Using BITS and PowerShell

    February 11, 2019
  • Fix: Clock Reverts to Wrong Time After Computer (Server) Reboot

    February 8, 2019
  • Fix: BSOD Error 0x0000007B on Boot on Windows 7 and Server 2008 R2

    February 7, 2019
  • How to Disable Automatic Driver Updates in Windows 10?

    February 6, 2019

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Unable to Connect RDP: CredSSP Encryption Oracle Remediation
  • Fix: Can’t Boot After Accidentally Deleted System Reserved Partition
  • Windows Update Error 0x80244022 and WsusPool Memory Limit
  • Unable to Install Print Driver after KB3170455
  • How to Filter Event Logs by Username in Windows 2008 and higher
  • Remote Desktop Connection Error: Outdated entry in the DNS cache
  • GPO Logging Using Gpsvc.log in Windows 7
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top