You are currently browsing legacy 3.5 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Recovering from Esent errors


  • RavenDB server side error messages like:
    • Secondary index is corrupt. The database must be defragmented
    • System.InvalidOperationException: Could not open transactional storage


An error in Esent's file.


Run Esent Utility for recovering from errors. There are two approaches to recover a corrupted database:

  • Recovery - a loss-less operation that tries to recover the Esent file (esentutl /r RVN /l logs /s system)
  • Repair - a more aggressive approach that may cause data loss (esentutl /p Data)

In both cases, at the end, the defragmentation should be performed (esentutl /d Data)

Equivalent options for a file system:

  • Recovery - esentutl /r RFS /l logs /s system
  • Repair - esentutl /p Data.ravenfs
  • Defragment - esentutl /d Data.ravenfs

Further read: