Lỗi is not a valid installation folder sql server 2023 năm 2024

When I click add it asks me to specify the installation folder so I browse to J:\sources\sxs and click ok.

I keep getting the message that sources\sxs is not a valid installation folder.

What now please?

  • Site Owners SSC Guru Points: 80318 Thanks for posting your issue and hopefully someone will answer soon. This is an automated bump to increase visibility of your question.
  • wbailey Grasshopper Points: 12 Is your SQL install actually in drive J: or is J: relative to whatever drive it is actually in? Just a thought.
  • Jay@Work

    SSCrazy Points: 2628 J drive is the drive that the ISO is mounted to. I also tried copying the relevant folder to the local C drive and reissuing the command. Still no good. I've come across this before and had to use the DISM command. I just can't find the command specific to full text indexing Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

    Error that Data or Log directory in the registry is not valid when installing SQL Server Cumulative Update or a Service Pack Article 07/28/2023

    In this article

    This article helps you resolve the problem that occurs when you install a Cumulative Update or a Service Pack for a SQL Server instance. Original product version: SQL Server Original KB number: 2565113

    Symptoms

    When you install a Cumulative Update or a Service Pack for a SQL Server instance, the setup process may fail with one of the following error messages:

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

    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

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

    When the problem occurs, the SQL Server Setup log file Summary.txt has one of the following messages:

    Detailed results: Feature: Database Engine Services Status: Failed: see logs for details Reason for failure: An error occurred during the setup process of the feature. Next Step: Use the following information to resolve the error, and then try the setup process again. Component name: SQL Server Database Engine Services Instance Features Component error code: 0x851A0043 Error description: The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory. Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.7001.0&EvtType=0xD8FB5EBA%400x97A656BB%401306%4067&EvtType=0xD8FB5EBA%400x97A656BB%401306%4067

    Detailed results: Feature: Database Engine Services Status: Failed: see logs for details Reason for failure: An error occurred during the setup process of the feature. Next Step: Use the following information to resolve the error, and then try the setup process again. Component name: SQL Server Database Engine Services Instance Features Component error code: 0x851A0044 Error description: The User Log directory in the registry is not valid. Verify DefaultLog key under the instance hive points to a valid directory. Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.7001.0&EvtType=0xD8FB5EBA%400x97A656BB%401306%4068&EvtType=0xD8FB5EBA%400x97A656BB%401306%4068

    Cause

    The issue happens when the default locations of new data or log files for a database point to an invalid location. Common scenarios that lead to this issue are:
  • Change of storage drives for database and log files and missing to update the default data and log location.
  • A misconfiguration of the default data or log path during initial installation in the Data Directories tab (see ).
  • A misconfiguration of the default data or log path under Database Settings in SQL Server Management Studio (see View or Change the Default Locations for Data and Log Files).

    Resolution

    Use the following procedure to resolve the problem.

    Step 1: Correct the default data and log directories valid folder paths

    You can set the default data directory and log directory values to valid folder paths by using either SQL Server Management Studio or Registry Editor.

    Method 1: Use SQL Server Management Studio (SSMS) and SQL Server Configuration Manager
  • In SSMS, open Object Explorer, right-click a server instance and select Properties.
  • In the left panel, select the Database Settings page.
  • In Database default locations, view the current default locations for new data files and new log files.
  • To change the default location, enter a new default pathname in the Data or Log field, or select the browse button to find and select a pathname.
  • Open SQL Server Configuration Manager and select SQL Server Services.
  • Double-click your instance and select the Advanced tab.
  • Review the Data Path property and see if the value is correct. The value is grayed out and can't be modified from here.
  • If the value is incorrect, use to update it to the correct path.
    Method 2: Use registry editor
    Important This section, method, or task contains steps that tell you how to modify the registry. Serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.
  • Start Registry Editor (Regedit.exe) from the command line.
  • Locate and then select the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL{nn}.Instance\MSSQLServer. Note In this registry subkey, MSSQL{nn}.Instance represents the corresponding value for your system. To obtain this value, locate and then select the registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\.
  • In the right panel, select the DefaultData registry entry and enter a valid path, if it's pointing to an incorrect location.
  • In the right panel, select the DefaultLog registry entry and enter a valid path, if it's pointing to an incorrect location.
  • Locate and then select the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL{nn}.Instance\Setup.
  • In the right panel, select the SQLDataRoot registry entry and enter a valid path, if it's pointing to an incorrect location.

    Step 2: Retry the installation of Service Pack or Cumulative Update

    Once you have corrected the data and log paths for the affected instance, you can retry the installation. The setup program may show that the instance has already been upgraded and it may not allow you to select just the Database Services component. You need to select all the features for that instance for the setup program to continue.