Freigeben über


SQL Server 2008: “Could not fix registry key” Issue and how to resolve

In SQL Server 2008, we added a tool to fix some registry keys to address some known issues.  We recently discovered this tool can fail on rare occasions when it does not have permissions to all required registry keys.

 

If a rule fails with the following message:

“The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix.” you might be hitting this issue. See below to determine whether you are encountering this issue and how to address.

 

If you view the “SystemConfigurationCheck_Report.htm” that is located in %programfiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\<latest session>, you will see this error, as shown below:

image

If you view the Summary*GlobalRules.txt, you will see:

image

If you view the Summary*GlobalRules.txt, you will see:

 

This error happens since some registry keys that need to be fixed do not have administrator access. In this log file, the Lpc key does not have administrator access:

2009-07-31 14:34:16 Slp: Could not fix registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MICROSOFTBCM\MSSQLServer\SuperSocketNetLib\Lpc.
2009-07-31 14:34:16 Slp: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

2009-07-31 14:34:16 Slp: at Microsoft.SqlServer.Configuration.FixSqlRegistryKey.Program.OpenKey(String keyName)
2009-07-31 14:34:16 Slp: at Microsoft.SqlServer.Configuration.FixSqlRegistryKey.Program.FixRegistryKey(String keyName)
2009-07-31 14:34:16 Slp: at Microsoft.SqlServer.Configuration.FixSqlRegistryKey.Program.FixRegistryKeyAndSubKeys(RegistryKey key)

2009-07-31 14:34:17 Slp: Error: Action "RunStandaloneRules" threw an exception during execution.
2009-07-31 14:34:17 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys. ---> Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngineRuleFailureException: The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys.
2009-07-31 14:34:17 Slp: at Microsoft.SqlServer.Configuration.RulesEngineExtension.RunRulesAction.ExecuteAction(String actionId)
2009-07-31 14:34:17 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
2009-07-31 14:34:17 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
2009-07-31 14:34:17 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
2009-07-31 14:34:17 Slp: --- End of inner exception stack trace ---
2009-07-31 14:34:17 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
2009-07-31 14:34:18 Slp: Received request to add the following file to Watson reporting: C:\Documents and Settings\hoffman\Local Settings\Temp\tmp346.tmp
2009-07-31 14:34:18 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
2009-07-31 14:34:18 Slp: Inner exceptions are being indented
2009-07-31 14:34:18 Slp:
2009-07-31 14:34:18 Slp: Exception type: Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngineRuleFailureException
2009-07-31 14:34:18 Slp: Message:
2009-07-31 14:34:18 Slp: The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys.
2009-07-31 14:34:18 Slp: Data:
2009-07-31 14:34:18 Slp: DisableWatson = true
2009-07-31 14:34:18 Slp: Stack:
2009-07-31 14:34:18 Slp: at Microsoft.SqlServer.Configuration.RulesEngineExtension.RunRulesAction.ExecuteAction(String actionId)
2009-07-31 14:34:18 Slp: at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
2009-07-31 14:34:18 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
2009-07-31 14:34:18 Slp: at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
2009-07-31 14:34:20 Slp:
2009-07-31 14:34:20 Slp: ----------------------------------------------------------------------
2009-07-31 14:34:20 Slp:
2009-07-31 14:34:20 Slp: Error result: -2067922433
2009-07-31 14:34:20 Slp: Result facility code: 1214
2009-07-31 14:34:20 Slp: Result error code: 511

 

Workaround:

Open up the registry and navigate to the registry key with the issue can give the administrator access to the registry key. 

 

As always, use extreme caution when modifying the windows registry.

Comments

  • Anonymous
    May 26, 2010
    Thanks, it works now after giving permition to Key entry

  • Anonymous
    August 25, 2010
    I can't find the problematic key. which log file/where in the file should I be looking?

  • Anonymous
    October 12, 2010
    @oompa_l please try this "I got this issue fixed by running SQL2008 Service Pack 1 prior to the Main Install.  SQL2008 Service Pack installed the latest intial files and corrected registry permission." social.msdn.microsoft.com/.../dineshkotian Thanks Usman Shaheen usmanshaheen.wordpress.com

  • Anonymous
    June 10, 2011
    I just replaced following file "C:Program FilesMicrosoft SQL Server100Setup BootstrapReleasex86FixSqlRegistryKey_x86.exe"  with "%x86FixSqlRegistryKey_x86.exe". It worked for me.

  • Anonymous
    April 25, 2012
    The comment has been removed