How to repair corrupt or dirty registry hive files - 0x800703f1 - ERROR_BADDB / error 0xc000014c

Maxstar

Moderator, Windows Update Expert, Security Analyst
Staff member
Joined
Aug 16, 2015
Posts
15,122
Location
The Netherlands
Warning: This guide is aimed at technical users only; failure to follow the instructions given in this tutorial in a proper and safe manner can lead to further issues.

In this tutorial, we've going to look over at how to repair some common issues with registry hive files. Please note that we do not accept any responsibility or liability for any damage improper following of these instructions may cause to your operating system, and therefore by following these instructions, you accept full responsibility for your actions and understand the risks involved. If you do not feel comfortable following this tutorial, then please follow our posting instructions and a helper will assist you. Please note that we have a very limited pool of helpers and therefore it may take a few days for someone to reach your thread.

Before continuing, it is recommended that you take a note of the following:
  • Sequence Number Checker is not digitally signed and means that it could be flagged as malicious or be blocked by SmartScreen. However, this is a false positive and all the tools provided by Sysnative are 100% safe.
  • When the tool is blocked or quarantined during the repair process of an hive file it may result in corrupt (incomplete) file. So always use a backup copy of the original file.
  • This tool requires the Visual C++ Redistributable package to be installed, otherwise you might see an MSVCP140.dll, VCRUNTIME140_1.dll or VCRUNTIME140.dll was not found message!
  • When your COMPONENTS hive is corrupted, please follow the instructions in the thread: How to check your COMPONENTS registry hive for corruption!

How to make a decent backup of the registry

The following tool is perfectly suited to make manual and frequent backups of essential registry files. So when your system is still bootable, please don't skip this step and make a backup of your registry files, or even better a full system image using a tool like Macrium Reflect.

Download
6437fe135e156-Acelogix-RegBak.png
Acelogix RegBak (Portable) to create a backup of the registry.
  • Extract RegBak.zip and right-click regbak64.exe and select "Run as administrator".
  • Click on the button New backup and choose the location where you want to save the backup.
  • Optional: enter a description for this backup.
  • Now click on the option "Click here to view details".
  • Ensure the option Select hives not loaded by Windows is checked, to be sure the following items are included in the backup.

    RegBak.webp


  • Click Ok to save these settings and press Start to create the backup.
  • When completed you will see the message: Finished successfully.

A gentle introduction to registry hive files and the possible cause of corruptions:

The Windows registry is actually a database to store essential system information; a more detailed explanation can be found in this document of Microsoft. It is also good to know that not all registry hive files are continuously loaded into the registry. Some examples are the COMPONENTS and DRIVERS hive. Both hive files are primarily loaded during the Windows update process, but how can those hives get corrupted if they are not loaded by default? This could be due to several reasons, like:
  • Power outages and system crashes that made it impossible that the loaded hive was being fully written to the system drive before the shut down.
  • It may also be caused by insufficient disk space on the system drive, which prevents the loaded hive from being fully written to the system drive.
  • Memory and/or harddrive (SSD) failures could also be the cause of such kind of issues.
The essential locations of registry hive files:
  • C:\Windows\System32\config (COMPONENTS / DRIVERS / SYSTEM etc.)
  • C:\Windows\System32\SMI\Store\Machine (SCHEMA.DAT)
ERROR_BADDB examples:

Corrupt DRIVERS hive

Rich (BB code):
2024-09-17 03:27:38, Error                 CBS    Doqe: Failed staging driver updates [HRESULT = 0x800703f1 - ERROR_BADDB]

Corrupt SYSTEM hive
Rich (BB code):
2019-12-07 23:31:30, Info CBS Failed to load offline SYSTEM hive. [HRESULT = 0x800703f1 - ERROR_BADDB]

File:\windows\system32\config\system
Status: 0xc000014c
Info: Windows failed to load because the system registry file is missing, or corrupt.

Corrupt COMPONENTS hive
Rich (BB code):
2024-09-25 09:59:54, Info                  CBS    Failed to load the COMPONENTS hive from 'C:\Windows\System32\config\COMPONENTS' into registry key 'HKLM\COMPONENTS'. [HRESULT = 0x800703f1 - ERROR_BADDB]

How to load hive files into the registry or an offline registry editor:

When you try to load a corrupted hive into the Windows Registry Editor you will see the message: Cannot load C:\Users\\Desktop\SYSTEM: Error while loading hive.
Note: Use always a {random} name when you try to load such an hive under the HKLM key on your own system like: BAD-SYSTEM / TMP-SYSTEM / TEST-SYSTEM etc!

error-regedit.webp


When you try to load such an hive file with Eric Zimmerman's Registry Explorer (direct link) you will see the following message:

error-registryexplorer.webp


As we can see the primary and secondary sequence numbers do not match!

How to repair corrupt or dirty hive files with Sequence Number Checker:

To resolve such issues @x BlueRobot developed SequenceNumberChecker to repair corrupt / dirty hives!
  • To use this tool, just drag and drop the corrupt / dirty hive over the SequenceNumberChecker executable.
  • Note: The example below is just a dummy file to explain the purpose of the tool!
SNC-example.gif

  • When the tool completed you will see the following message:
Rich (BB code):
Primary and secondary sequence number mismatch!
Performing repairs...
Repairs have completed...press any key to exit
  • Now you can close the command line window and replace the corrupted hive with the repaired hive into the correct location.
Notes and how to replace hive files:
  • The system hive can only be replaced through the Recovery Environment.
  • Rename always the corrupted hive file before replacing it with the repaired hive, just to be sure you have this file as backup too!.

If you're seeking help with a corrupted hive, Windows Update problem or driver issues, then please follow these Windows Update Forum Posting Instructions
 
Last edited:

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top