none
Win 2008 R2 Core 安装 SQL Server 2012/14的问题 RRS feed

  • 问题

  • 在 Win 2008 R2 WITH SP1 下安装 SQL Server 2012 WITH SP4 或 SQL 2014 SP2

    如果操作系统安装使用完全(带GUI),则安装没有任何问题

    如果操作系统使用Core模式,则安装日志显示如下问题:

    ( 同样的 SQL Server 安装程序在 2012 R2 Core 模式下安装也没有问题)

    (01) 2018-11-05 17:45:34 Slp: ----------------------------------------------------------------------
    (01) 2018-11-05 17:45:34 Slp: Running Action: SetPatchInstallStateAction
    (01) 2018-11-05 17:45:34 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
    (01) 2018-11-05 17:45:34 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Windows\CurrentVersion\Uninstall
    (01) 2018-11-05 17:45:34 Slp: Error: Action "Microsoft.SqlServer.Configuration.MsiExtension.SetPatchInstallStateAction" threw an exception during execution.
    (01) 2018-11-05 17:45:34 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: 未将对象引用设置到对象的实例。 ---> System.NullReferenceException: 未将对象引用设置到对象的实例。
    (01) 2018-11-05 17:45:34 Slp:    在 Microsoft.SqlServer.Configuration.MsiExtension.ArpRegKey.CleanupPatchedProductRegistryInfo()
    (01) 2018-11-05 17:45:34 Slp:    在 Microsoft.SqlServer.Configuration.MsiExtension.SetPatchInstallStateAction.ExecuteAction(String actionId)
    (01) 2018-11-05 17:45:34 Slp:    在 Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    (01) 2018-11-05 17:45:34 Slp:    在 Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context)
    (01) 2018-11-05 17:45:34 Slp:    --- 内部异常堆栈跟踪的结尾 ---

    --------------------------------------------------------------

    总结下来就是这样:

    Win 2008R2 WITH SP1 Full 模式  --  成功

    Win 2008R2 WITH SP1 Core 模式  --  失败

    Win 2012R2 Core 模式  --  成功

    安装使用的命令行:

    setup.exe /ACTION=Install /INSTANCENAME="SQL12" /SQLSYSADMINACCOUNTS="%UserDomain%\%UserName%" /INSTALLSQLDATADIR="C:\SQL_DATA" /SAPWD="Abcd.1234" /BROWSERSVCSTARTUPTYPE=Disabled /TCPENABLED=1 /NPENABLED=0 /SECURITYMODE=SQL /SQLCOLLATION="Chinese_PRC_CI_AS" /SQLSVCSTARTUPTYPE=Automatic /FEATURES=SQLENGINE /AGTSVCSTARTUPTYPE=Automatic /Q /IACCEPTSQLSERVERLICENSETERMS

    2018年11月6日 6:29

答案

  • Hi zjcxc.邹建,

    请检查一下这个键值  Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,如果没有请将其添加进去。

    Best Regards,

    Teige


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2018年11月8日 8:49
    版主

全部回复

  • Hi zjcxc.邹建,

    您可以告诉我一些关于您Windows Server 2008 R2环境的更详细信息吗?例如是不是在hyper-v上安装的,是否使用的Server Core 2008 R2 VHD安装介质?

    部分Windows Server 2008 R2 Core的注册表中缺少Software\Microsoft\Windows\CurrentVersion\Uninstall键值,可以通过下面的脚本讲该键值添加进去。

    add reg HKLM\Software\Microsoft\Windows NT\CurrentVersion\Uninstall

    Best Regards,

    Teige


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2018年11月8日 2:23
    版主
  • 自己装的 Hyper-V

    MSDN订阅下载的版本:cn_windows_server_2008_r2_with_sp1_x64_dvd_617598.iso

    file hash SHA1: 38BFF8DA3BEAA742ECA54A6F584403BD253444B5

    安装时选择: Windows Server 2008 R2 Datacenter (服务器核心安装)

    ---------------

    至于 Uninstall 这个,不管在 CORE 还是 完全安装(带GUI) 中,都是查不到的(完全安装成功安装了 SQL Server之后也没有这个)

    reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Uninstall"

    当然,我仍然把这个加上测试了一下,还是安装失败,同样在的错误

    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Uninstall"

    2018年11月8日 8:20
  • Hi zjcxc.邹建,

    请检查一下这个键值  Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,如果没有请将其添加进去。

    Best Regards,

    Teige


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2018年11月8日 8:49
    版主
  • reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

    唉,一直在研究下面的错误,没注意看上面的,回头看其实日志写得很清楚

    (01) 2018-11-05 17:45:34 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine
    (01) 2018-11-05 17:45:34 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Windows\CurrentVersion\Uninstall

    2018年11月8日 9:55
  • .net你装了吗?

    想不想时已是想,不如不想都不想。

    2018年11月8日 9:56
    版主