SQL Server 2022 won't install

Zuhayr Arif Zakaria 5 Reputation points
2023-03-08T13:29:55.8733333+00:00
Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2068119551
  Exit facility code:            1211
  Exit error code:               1
  Exit message:                  Cannot find registry key 'SOFTWARE\Microsoft\Microsoft SQL Server\160\ConfigurationState'.
  Start time:                    2023-03-08 21:21:41
  End time:                      2023-03-08 21:22:01
  Requested action:              Install
  Exception help link:           https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=0xF96176E5%400xD3BEBD98%401211%401&EvtType=0xF96176E5%400xD3BEBD98%401211%401

Setup completed with required actions for features.
Troubleshooting information for those features:
  Next step for SQLEngine:       Use the following information to resolve the error, and then try the setup process again.
  Next step for Writer:          SQL Server Setup was canceled before completing the operation. Try the setup process again.


Machine Properties:
  Machine name:                  ZUHAYRARIF
  Machine processor count:       12
  OS version:                    Microsoft Windows 11 Home Single Language (10.0.22621)
  OS service pack:               
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x64
  Process architecture:          64 Bit
  OS clustered:                  No

Product features discovered:
  Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered  Configured

Package properties:
  Description:                   Microsoft SQL Server 2022 
  ProductName:                   SQL Server 2022
  Type:                          RTM
  Version:                       16
  SPLevel:                       0
  Installation location:         C:\SQL2022\Express_ENU\x64\setup\
  Installation edition:          Express

Product Update Status:
  User selected not to include product updates.

Notice: Please read Microsoft SQL Server Software License Terms at aka.ms/useterms.

User Input Settings:
  ACTION:                        Install
  ADDCURRENTUSERASSQLADMIN:      true
  AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
  AGTSVCPASSWORD:                *****
  AGTSVCSTARTUPTYPE:             Disabled
  ASBACKUPDIR:                   Backup
  ASCOLLATION:                   Latin1_General_CI_AS
  ASCONFIGDIR:                   Config
  ASDATADIR:                     Data
  ASLOGDIR:                      Log
  ASPROVIDERMSOLAP:              1
  ASSERVERMODE:                  TABULAR
  ASSVCACCOUNT:                  <empty>
  ASSVCPASSWORD:                 <empty>
  ASSVCSTARTUPTYPE:              Automatic
  ASSYSADMINACCOUNTS:            <empty>
  ASTELSVCACCT:                  <empty>
  ASTELSVCPASSWORD:              <empty>
  ASTELSVCSTARTUPTYPE:           0
  ASTEMPDIR:                     Temp
  AZUREARCPROXYSERVER:           <empty>
  AZUREBILLEDEDITION:            
  AZUREREGION:                   <empty>
  AZURERESOURCEGROUP:            <empty>
  AZURESERVICEPRINCIPAL:         <empty>
  AZURESERVICEPRINCIPALSECRET:   <empty>
  AZURESUBSCRIPTIONID:           <empty>
  AZURETENANTID:                 <empty>
  BROWSERSVCSTARTUPTYPE:         Disabled
  CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20230308_212141\ConfigurationFile.ini
  ENABLERANU:                    true
  ENU:                           true
  EXTSVCACCOUNT:                 <empty>
  EXTSVCPASSWORD:                <empty>
  FEATURES:                      SQLENGINE
  FILESTREAMLEVEL:               0
  FILESTREAMSHARENAME:           <empty>
  FTSVCACCOUNT:                  <empty>
  FTSVCPASSWORD:                 <empty>
  HELP:                          false
  IACCEPTSQLSERVERLICENSETERMS:  true
  IACKNOWLEDGEENTCALLIMITS:      false
  INDICATEPROGRESS:              true
  INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
  INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
  INSTALLSQLDATADIR:             <empty>
  INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server
  INSTANCEID:                    SQLEXPRESS
  INSTANCENAME:                  SQLEXPRESS
  ISMASTERSVCACCOUNT:            NT AUTHORITY\Network Service
  ISMASTERSVCPASSWORD:           <empty>
  ISMASTERSVCPORT:               8391
  ISMASTERSVCSSLCERTCN:          <empty>
  ISMASTERSVCSTARTUPTYPE:        Automatic
  ISMASTERSVCTHUMBPRINT:         <empty>
  ISSVCACCOUNT:                  NT AUTHORITY\Network Service
  ISSVCPASSWORD:                 <empty>
  ISSVCSTARTUPTYPE:              Automatic
  ISTELSVCACCT:                  <empty>
  ISTELSVCPASSWORD:              <empty>
  ISTELSVCSTARTUPTYPE:           0
  ISWORKERSVCACCOUNT:            NT AUTHORITY\Network Service
  ISWORKERSVCCERT:               <empty>
  ISWORKERSVCMASTER:             <empty>
  ISWORKERSVCPASSWORD:           <empty>
  ISWORKERSVCSTARTUPTYPE:        Automatic
  NPENABLED:                     0
  PBDMSSVCACCOUNT:               <empty>
  PBDMSSVCPASSWORD:              <empty>
  PBDMSSVCSTARTUPTYPE:           0
  PBENGSVCACCOUNT:               <empty>
  PBENGSVCPASSWORD:              <empty>
  PBENGSVCSTARTUPTYPE:           0
  PBPORTRANGE:                   <empty>
  PID:                           *****
  PRODUCTCOVEREDBYSA:            false
  QUIET:                         true
  QUIETSIMPLE:                   false
  ROLE:                          AllFeatures_WithDefaults
  SAPWD:                         <empty>
  SECURITYMODE:                  <empty>
  SQLBACKUPDIR:                  <empty>
  SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
  SQLMAXDOP:                     0
  SQLMAXMEMORY:                  2147483647
  SQLMINMEMORY:                  0
  SQLSVCACCOUNT:                 NT Service\MSSQL$SQLEXPRESS
  SQLSVCINSTANTFILEINIT:         true
  SQLSVCPASSWORD:                <empty>
  SQLSVCSTARTUPTYPE:             Automatic
  SQLSYSADMINACCOUNTS:           ZUHAYRARIF\zuhay
  SQLTELSVCACCT:                 NT Service\SQLTELEMETRY$SQLEXPRESS
  SQLTELSVCPASSWORD:             <empty>
  SQLTELSVCSTARTUPTYPE:          Automatic
  SQLTEMPDBDIR:                  <empty>
  SQLTEMPDBFILECOUNT:            1
  SQLTEMPDBFILEGROWTH:           64
  SQLTEMPDBFILESIZE:             8
  SQLTEMPDBLOGDIR:               <empty>
  SQLTEMPDBLOGFILEGROWTH:        64
  SQLTEMPDBLOGFILESIZE:          8
  SQLUSERDBDIR:                  <empty>
  SQLUSERDBLOGDIR:               <empty>
  SUPPRESSPAIDEDITIONNOTICE:     false
  SUPPRESSPRIVACYSTATEMENTNOTICE: false
  TCPENABLED:                    0
  UIMODE:                        AutoAdvance
  UpdateEnabled:                 false
  UpdateSource:                  MU
  USEMICROSOFTUPDATE:            false
  USESQLRECOMMENDEDMEMORYLIMITS: false

  Configuration file:            C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20230308_212141\ConfigurationFile.ini

Detailed results:
  Feature:                       Database Engine Services
  Status:                        Failed
  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:          1639
  Component log file:            C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20230308_212141\sql_engine_core_inst_Cpu64_1.log
  Error description:             Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
  Error help link:               https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=sql_engine_core_inst.msi%400x162A16FE%400x1639

  Feature:                       SQL Writer
  Status:                        Failed
  Reason for failure:            Setup was canceled for the feature.
  Next Step:                     SQL Server Setup was canceled before completing the operation. Try the setup process again.

Rules with failures or warnings:

Global rules:
Warning    IsFirewallEnabled                The Windows Firewall is enabled. Make sure the appropriate ports are open to enable remote access. See the rules documentation at https://go.microsoft.com/fwlink/?linkid=2162127 for information about ports to open for each feature.

Rules report file:               C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20230308_212141\SystemConfigurationCheck_Report.htm

Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented

Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
    Message: 
        Cannot find registry key 'SOFTWARE\Microsoft\Microsoft SQL Server\160\ConfigurationState'.
    HResult : 0x84bb0001
        FacilityCode : 1211 (4bb)
        ErrorCode : 1 (0001)
    Data: 
      DisableWatson = true
    Stack: 
        at Microsoft.SqlServer.Configuration.Sco.FeatureRegistration.SetFeatureFlag(String machine, String featureId, String flagName, String registryKey, Object flagState, RegistryView cpuView)
        at Microsoft.SqlServer.Configuration.Sco.FeatureRegistration.SetFeatureConfigState(String featureId, ConfigurationState configState, String version, RegistryView cpuView)
        at Microsoft.SqlServer.Configuration.SetupExtension.UpgradeIncompleteFeatureConfigEventHandler.MarkFeatureConfigured(FeatureId featureId, ConfigActionScenario scenario, Dictionary`2 actionData, String instanceId, Boolean keepFailedState)
        at Microsoft.SqlServer.Configuration.SetupExtension.UpgradeIncompleteFeatureConfigEventHandler.FeatureConfigurationExecutionEventHandler(Object sender, FeatureConfigScenarioEventArgs eventArgs, Boolean runValidation, Boolean featureFailed)
        at Microsoft.SqlServer.Configuration.SetupExtension.UpgradeIncompleteFeatureConfigEventHandler.FeatureConfigurationExecutionEventHandler(Object sender, Object[] objectArray)
        at Microsoft.SqlServer.Chainer.Infrastructure.NotificationHandler.Invoke(Object notification, Object[] objectArray)
        at Microsoft.SqlServer.Chainer.Infrastructure.NotificationService.OnNotify(Object eventKey, Object notification, Object[] objectArray)
        at Microsoft.SqlServer.Configuration.ConfigExtension.ConfigFeatureActionListener.InFeatureConfigurationExecutionEventHandler(ActionKey key, TextWriter loggingStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionMetadata.NotifyInExecution(ActionKey actionRunning, TextWriter loggingStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)

SQL Server | Other
{count} vote

3 answers

Sort by: Most helpful
  1. Fischer, Roland 0 Reputation points
    2023-03-08T16:12:28.0533333+00:00

    If you´ll use installationpath C:\SQL2022\Express_ENU\x64\setup, system could not find key. Plz try with default path like C:\Program Files\Microsoft SQL Server.

    regards

    Roland

    0 comments No comments

  2. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-03-08T16:36:35.6466667+00:00

    I would guess your registry is locked down or corrupt.

    0 comments No comments

  3. Seeya Xi-MSFT 16,586 Reputation points
    2023-03-09T02:10:54.34+00:00

    Hi @Zuhayr Arif Zakaria,

    Please go to SQL Server Setup program (setup.exe) from SQL Server installation media-> Maintenance in the left-hand navigation area-> Repair.

    User's image

    If this doesn't work, you can uninstall it cleanly and reinstall it.

    please follow the below steps to remove all components of previous installed SQL Server completely:

    1. Remove all SQL Server components from 'Programs and Features'
    2. Backup the registry
    3. Delete the following keys in regedit:

    --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

    --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer

    1. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing SQL Server
    2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing SQL Server
    3. Reboot the machine

    In addition, please use an administrator account to reinstall SQL Server on your computer(Right click->run as administrator).

    You'd better disable your anti-virus software and firewall before installation. Also, it is recommended that you install in the default location.

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.