Error installing SQL Server Database Engine Services Instance Features - The User Log directory in the registry is not valid

dba.stackexchange https://dba.stackexchange.com/questions/257856

Question

We have a SQL Server:

Microsoft SQL Server 2017 (RTM-CU14-GDR) (KB4494352) - 14.0.3103.1 (X64) Mar 22 2019 22:33:11 Enterprise Edition (64-bit) on Windows Server 2016 Datacenter 10.0 (Build 14393: ) (Hypervisor)

Tried to install "Cumulative Update Package 18 for SQL Server 2017 - KB4527377" https://www.microsoft.com/en-us/download/details.aspx?id=56128

Setup was doing something for 15 min, installing and updating files, stopping / starting services, it looked like its going to succeed, but in the end it showed this:

Action required:

Use the following information to resolve the error, and then try the setup process again.

Feature failure reason:

An error occurred during the setup process of the feature.

Error details:

Error installing SQL Server Database Engine Services Instance Features
The User Log directory in the registry is not valid.
Verify DefaultLog key under the instance hive points to a valid directory.
Error code: 0x851A0044 Visit https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.3257.3&EvtType=0xD8FB5EBA%400x97A656BB%401306%4068&EvtType=0xD8FB5EBA%400x97A656BB%401306%4068 to get help on troubleshooting.

SQL Server 2017 CU18 Update Fails

What's preventing CU18 from installing ?

Was it helpful?

Solution

Ok I found this article

https://blog.sqlauthority.com/2015/05/16/sql-server-service-pack-error-the-user-data-directory-in-the-registry-is-not-valid-verify-defaultdata-key-under-the-instance-hive-points-to-a-valid-directory/

It says my CU update fails because of Default Log path does not exist anymore

Default Log path can be checked by one of below ways:

  1. Execute T-SQL
exec [master].sys.xp_regread 
    @rootkey='HKEY_LOCAL_MACHINE', 
    @key='SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer\', 
    @value_name = 'DefaultLog'
  1. SSMS -> Right Click Server -> Properties -> Database Settings -> Database Default Locations
  2. Regedit -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer\DefaultLog

Updated Default Log path to point to existing location, and CU18 update installed fine without any errors

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top