The Database Engine system data directory in the registry is not valid

Hi friends, in this article, we will be discussing about the case where you might be updating or patching a SQL Server instance, and under certain circumstances you get the error message: The Database Engine system data directory in the registry is not valid.

 

The Error Message

The exact error message in the above scenario, is the following:

Error installing SQL Server Database Engine Services Instance Features
The Database Engine system data directory in the registry is not valid.
Error code: 0x851A0042

 

Root Cause Analysis

From the above error message, we conclude that the update/patching process failed, due to an invalid registry value.

 

How to Resolve the Issue

In order to resolve the issue, we need to perform a check (and possibly a correction) in the relevant registry key.

To this end, within Windows Registry Editor, you navigate to:

  1. HKEY_LOCAL_MACHINE
  2. SOFTWARE
  3. Microsoft
  4. Microsoft SQL Server
  5. MSSQL[VersionNumber].[InstanceName]
  6. Setup

 

In the “Setup” registry folder, you will find a key named “SQLDataRoot“.

You need to check the value for this key, since this is the value that is found as invalid by the SQL Server update/patching process.

To this end, if indeed this value is invalid, you need to change it by setting a valid directory path.

After you set the valid directory path, you can try again with the update/patching process.

 

Variations of the the Same Issue

Note that there can be variations of the same issue, with the only actual difference that these variations might be referencing other relevant settings (i.e. registry key values).

Example of similar error messages can be:

  • Error message:
    • The User Data directory in the registry is not valid.
      Verify DefaultData key under the instance hive points to a valid directory.
  • Proposed action:
    • Check and update (if needed) the relevant registry key value for “DefaultData” in the “MSSQL[VersionNumber].[InstanceName]” registry folder

 

  • Error message:
    • The User Log directory in the registry is not valid.
      Verify DefaultLog key under the instance hive points to a valid directory.
  • Proposed action:
    • Check and update (if needed) the relevant registry key value for “DefaultLog” in the “MSSQL[VersionNumber].[InstanceName]” registry folder

 


Strengthen your SQL Server Administration Skills – Enroll to our Online Course!

Check our online course on Udemy titled “Essential SQL Server Administration Tips
(special limited-time discount included in link).

Via the course, you will learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!

Essential SQL Server Administration Tips - Online Course with Live Demonstrations and Hands-on Guides
(Lifetime Access/ Live Demos / Downloadable Resources and more!)

Enroll Now with Discount!

 


 

Learn essential SQL Server development tips! Enroll to our Online Course!

Check our online course titled “Essential SQL Server Development Tips for SQL Developers
(special limited-time discount included in link).

Sharpen your SQL Server database programming skills via a large set of tips on T-SQL and database development techniques. The course, among other, features over than 30 live demonstrations!

Essential SQL Server Development Tips for SQL Developers - Online Course
(Lifetime Access, Certificate of Completion, downloadable resources and more!)

Enroll Now with Discount!


 

Featured Online Courses:

 

Read Also:

 

 

Subscribe to our newsletter and stay up to date!

Subscribe to our YouTube channel (SQLNetHub TV)

Easily generate snippets with Snippets Generator!

Secure your databases using DBA Security Advisor!

Generate dynamic T-SQL scripts with Dynamic SQL Generator!

Check our latest software releases!

Check our eBooks!

 

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Loading...

Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub