Problem Installing SQL Server 2008 on a Vista Box
Installing SQL Server 2008 Developer Edition RTM on one of my desktop having Windows Vista has been a nightmarish experience for me. The setup always failed at the end while running post installation scripts with an error message “Access is denied”. I tried running setup with all possible security settings that I could have but of no avail.
When I checked the installation log file, I found the following
2008-11-06 09:23:21 SQLEngine: : Checking Engine checkpoint 'GetSqlServerProcessHandle'
2008-11-06 09:23:21 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' to be created
2008-11-06 09:23:26 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' or sql process handle to be signaled
2008-11-06 09:23:26 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-11-06 09:23:26 Slp: Access is denied
2008-11-06 09:23:26 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-11-06 09:23:26 Slp: System.ComponentModel.Win32Exception: Access is denied
2008-11-06 09:23:26 Slp: at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
2008-11-06 09:23:26 Slp: at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
2008-11-06 09:23:26 Slp: at System.Diagnostics.Process.OpenProcessHandle()
2008-11-06 09:23:26 Slp: at System.Diagnostics.Process.get_Handle()
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerStartup.StartSQLServerForInstall(String sqlCollation, String masterFullPath, Boolean isConfiguringTemplateDBs)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
2008-11-06 09:23:26 Slp: Exception: System.ComponentModel.Win32Exception.
2008-11-06 09:23:26 Slp: Source: System.
2008-11-06 09:23:26 Slp: Message: Access is denied.
After spending some time on google, I could not resolve the problem. So, I logged an incident with Microsoft Support but even after spending 3 hours with the support engineer the issue could not be resolved. Next day I tried to install it on my freshly built laptop with Windows Vista and to my surprise it got installed without any problem. I assumed the problem may have something to do with some corporate group security policy on the desktop which might have changed after installing some of the security updates and since this laptop is freshly build so it might not contain those updates and I was able to install SQL Server 2008 successfully. At that point of time I remembered somebody talking about WinHttpAutoProxy Service and its security descriptor. I tried to find the security descriptor for this service on both my laptop as well as the desktop using command:
SC sdshow WinHttpAutoProxySvc
Security Descriptors I got for both these machines were different. So, I went ahead and replaced WinHttpAutoProxy Service’s security descriptor on desktop with the one I got from laptop for the same service. The command for it is:
SC sdset winhttpautoproxysvc D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;LCRP;;;IU)(A;;LCRP;;;SU)
Note: To issue this command you have to run Command Prompt with Administrative Privilege. You can find more information on Security Descriptors here and here.
After that I tried installing SQL Server 2008 again and it installed smoothly. Frankly, I don’t know the reason why setup depends on WinHttpAutoProxy Service or whether it depends on it at all but wouldn’t it better if we get details of the actual error encountered during the setup in more intuitive fashion than simply saying "Access is denied". It would certainly help us solving the problem quickly. I hope Microsoft addresses this pain point in future.
