The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory.

-> I was performing an In-Place upgrade of SQL Server from SQL Server 2017 to SQL Server 2019.

-> The upgrade failed with below error,

TITLE: Microsoft SQL Server 2019 Setup
------------------------------

The following error has occurred:

The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory.

For help, click: https://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=15.0.4013.40&EvtType=0xD8FB5EBA%25400x97A656BB%25401306%254067

------------------------------
BUTTONS:

OK
------------------------------

-> The error states that there is some issue with the data directory.

-> I right clicked on the SQL Server instance and clicked on properties. Clicked on “Database Settings” and verified “Database default locations”. The data location mentioned is “F:\data1\”. This location is not available on the database server.

-> I corrected it to F:\data which is available on the database server and then clicked OK. Started the In-Place upgrade again and it completed fine.

-> This issue also happens during Service pack and cumulative updates install also. We should make sure that the “Data” and “Log” location is correct under “Database Settings” in SQL Server Instance properties.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

One thought on “The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory.

  1. Pingback: The Instance ID ‘MSSQLSERVER’ is already in use by SQL Server instance ‘MSSQLSERVER.INACTIVE’ | JBs Wiki

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s