다음을 통해 공유


SQL Server 2008 installation aborts due an access denied

Trying to install SQL Server 2008 on a standalone environment using an administrator account and getting an access denied? The problem could happen in case you have removed Local Administrator from ‘Debug privileges’ on local security policies or just because your local domain GPO removes it.

SQL Server installation log:

(…)

The Detail.txt indicates 3 "Access is Denied" errors. See below for the relevant extract:
2008-09-19 09:20:25 SQLEngine: : Checking Engine checkpoint 'GetSqlServerProcessHandle'
2008-09-19 09:20:25 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' to be created
2008-09-19 09:20:27 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' or sql process handle to be signaled
2008-09-19 09:20:27 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-09-19 09:20:27 Slp: Access is denied
2008-09-19 09:20:27 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-09-19 09:20:27 Slp: System.ComponentModel.Win32Exception: Access is denied
2008-09-19 09:20:27 Slp: at
System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
2008-09-19 09:20:27 Slp:    at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
2008-09-19 09:20:27 Slp:    at System.Diagnostics.Process.OpenProcessHandle()
2008-09-19 09:20:27 Slp:    at System.Diagnostics.Process.get_Handle()
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerStartup.StartSQLServerForInstall(String sqlCollation, String masterFullPath, Boolean isConfiguringTemplateDBs)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
2008-09-19 09:20:27 Slp: Exception: System.ComponentModel.Win32Exception.
2008-09-19 09:20:27 Slp: Source: System.
2008-09-19 09:20:27 Slp: Message: Access is denied.

2008-09-19 09:20:28 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080919_085714\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
2008-09-19 09:20:28 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080919_085714\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
2008-09-19 09:20:28 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080919_085714\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
2008-09-19 09:20:42 Slp: Access is denied
2008-09-19 09:20:42 Slp: Watson bucket for exception based failure has been created

(…)

The Summary returns following hex code: Configuration error code – 0x5D9A8C61

(…)

The access denied is raised on OpenProcess  WIN32 API, looking to MSDN WIN API description:

HANDLE WINAPI OpenProcess( __in DWORD dwDesiredAccess, __in BOOL
bInheritHandle, __in DWORD dwProcessId );
Parameters
dwDesiredAccess [in]

The access to the process object. This access right is checked against the security descriptor for the process. This parameter can be one or more of the process access rights <https://msdn.microsoft.com/en-us/library/ms684880(VS.85).aspx>.

If the caller has enabled the SeDebugPrivilege privilege, the requested access is granted regardless of the contents of the security descriptor.
bInheritHandle [in] If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.
dwProcessId [in] The identifier of the local process to be opened.
Return ValueIf the function succeeds, the return value is an open handle to the specified process.
If the function fails, the return value is NULL. To get extended error information, call GetLastError <https://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx>.

Remarks
To open a handle to another local process and obtain full access rights, you must enable the SeDebugPrivilege privilege. For more information, see Changing Privileges in a Token <https://msdn.microsoft.com/en-us/library/ms717797(VS.85).aspx>.
The handle returned by the OpenProcess function can be used in any function that requires a handle to a process, such as the wait functions
<https://msdn.microsoft.com/en-us/library/ms687069(VS.85).aspx>, provided the appropriate access rights were requested.
When you are finished with the handle, be sure to close it using the CloseHandle <https://msdn.microsoft.com/en-us/library/ms724211(VS.85).aspx> function.

Note: Please reboot your machine after granting this permission, gpupdate /force is not enough, reboot is needed.

If problem still persists please execute the following command to reset SCM settings to default values

SC sdset winhttpautoproxysvc D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;LCRP;;;IU)(A;;LCRP;;;SU)

Comments

  • Anonymous
    February 12, 2009
    I have to say that the improvements in the SQL 2008 installation have been pretty good to me. We have

  • Anonymous
    April 09, 2010
    i'm currently having issues with the sedebugprivilege and installation.  currently gp has blocked the debug programs security on the local machine (also removed admins).  is there a way to suppress the portion of the install that requires the sedebugprivilege...?

  • Anonymous
    October 15, 2010
    For me, this issue was a bit tricky.  I double and triple checked permissions - installed as local admin user with full rights to everything.   The clue was to pay very close attention to the time when the first error is thrown in the install.   Then checking the detail.txt log for that precise timestamp, I found an issue with permissions on this registry key: HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTC I manually set them to full permissions, and the next install worked fine. For what it's worth, this was a 2008 R2 Server Hyper-V install of Sql Server 2008 64-bit on a hosted 2003 R2 SP2 server.