Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Secondary index is corrupt. The database must be defragmented

Tags:

ravendb

Problem has appeared after DB restore. How I can repair DB?

like image 512
Gengzu Avatar asked Jun 03 '12 13:06

Gengzu


3 Answers

Gengzu, You probably moved the database between machines. In order to resolve the problem, you need to run:

 esentutl /d Data

From the RavenDB data directory

like image 51
Ayende Rahien Avatar answered Nov 05 '22 05:11

Ayende Rahien


You should run the util from inside that Data folder in Raven. When I ran it in the root of Raven server -> "Operation terminated with error -1032..." also showed up.

like image 4
Anton Avatar answered Nov 05 '22 05:11

Anton


  1. Open a command prompt as administrator

  2. Change directory to RavenDB's \Database\System folder

  3. Run the command below.

    esentutl /d Data

like image 4
Karl Glennon Avatar answered Nov 05 '22 05:11

Karl Glennon