SQL Server Setup or Installation Failure on Windows 7 or 8.1

SQL Server installation or setup may fail with various reasons. Below is one of the weird error (Attempted to perform an unauthorized operation.) one may receive while installing SQL Server 2008 R2 or SQL Server 2012 on a computer with Operating System as Windows 7 or Windows 8.1.

Slp: Sco: Attempting to write hklm registry key SOFTWARE\Wow6432Node\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140114_235617\Registry_SOFTWARE_Wow6432Node_Microsoft_MSSQLServer.reg_
Slp: Attempted to perform an unauthorized operation.
Slp: Watson bucket for exception based failure has been created
SSIS: Failed to set registry permission on key ‘SOFTWARE\Microsoft\Microsoft SQL Server\100’ to SID ‘S-1-5-21-1526145828-320026549-172912389-1029’. Exception message: ‘Attempted to perform an unauthorized operation.’
Slp: Sco: Attempting to open registry subkey SOFTWARE\Microsoft\Microsoft SQL Server\100\SSIS
SSIS: Setting permision on registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\SSIS.
Slp: Sco: Attempting to replace account with sid in security descriptor D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: ReplaceAccountWithSidInSddl — SDDL to be processed: D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: ReplaceAccountWithSidInSddl — SDDL to be returned: D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: Sco: Attempting to set security descriptor D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: Sco: Attempting to normalize security descriptor D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: Sco: Attempting to replace account with sid in security descriptor D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: ReplaceAccountWithSidInSddl — SDDL to be processed: D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: ReplaceAccountWithSidInSddl — SDDL to be returned: D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: Sco: Attempting to normalize security descriptor D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: Sco: Attempting to replace account with sid in security descriptor D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: ReplaceAccountWithSidInSddl — SDDL to be processed: D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: ReplaceAccountWithSidInSddl — SDDL to be returned: D:(A;OICI;KR;;;S-1-5-21-1526145828-320026549-172912389-1029)
Slp: Prompting user if they want to retry this action due to the following failure:
Slp: —————————————-
Slp: The following is an exception stack listing the exceptions in outermost to innermost order
Slp: Inner exceptions are being indented
Slp:
Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
Slp: Message:
Slp: Attempted to perform an unauthorized operation.
Slp: Data:
Slp: WatsonData = SSIS
Slp: DisableRetry = true
Slp: Inner exception type: System.UnauthorizedAccessException
Slp: Message:
Slp: Attempted to perform an unauthorized operation.
Slp: Stack:

Slp: at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
Slp: at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
Slp: at Microsoft.SqlServer.Configuration.Sco.SqlRegistrySecurity..ctor(ResourceType resourceType, SafeRegistryHandle handle, AccessControlSections includeSections)
Slp: at Microsoft.SqlServer.Configuration.Sco.SqlRegistrySecurity.Create(InternalRegistryKey key)
Slp: at Microsoft.SqlServer.Configuration.Sco.InternalRegistryKey.SetSecurityDescriptor(String sddl, Boolean overwrite)

This error can occur due to various reasons, we can try below steps which should mostly resolve this error.

– Run the SQL Server setup by choosing “Run-as-Administrator”

– If the SQL Server setup or Installation media is on a DVD or network share, then copy the entire media on to C:\temp folder and then start the installation by choosing Run-as-Administrator”

– Make sure the Setup account used has local administrator permissions. Also grant local admin permission to SQL Server service account.

– When you get this error, do not abort, instead open registry editor and Grant full permissions to below registry keys to the setup account and SQL Service account and then click on retry.
SOFTWARE\Microsoft\Microsoft SQL Server\100
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server

After above steps are followed, mostly the issue must have been resolved.

This is applicable on below versions of SQL Server

SQL Server 2005
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Hope this was helpful.

Thanks,
SQLServerF1 Team
In-Depth Blogs on SQL Server, Information about SQL Server Conferences and Events, SQL Server Frequently asked questions, SQL Server Trainings.

 

Leave a Reply

Your email address will not be published. Required fields are marked *