安装程序错误?

安装程序错误?

我的目标是安装 MS SQL Server 2012 R2 Express。

我下载SQLEXPRADV_x64_ENU.exe并使用/ACTION=Install /UIMODE=Normal它生成和修改了一个配置文件。无论我如何摆弄配置,它都会安装“默认”或“命名”的标准版,尽管我指定许可证(忽略红色箭头这个图片,我选择其他选项)。

怎么回事?为了安装 Express 版本,我需要提供或更改哪些设置?

更新:有人告诉我我可能安装程序的版本错误。(他们很聪明,把所有版本都命名为相同。)我现在正在重新下载,不确定它是否不是我已经拥有的版本(如果我右键单击并选择“属性”,它会告诉我它是“Microsoft SQL Server 2012 Express Advanced Edition”)。

我知道在哪里下载Microsoft SQL Server 2008 R2 Express,我知道在哪里下载Microsoft SQL Server 2012 Express但是 Microsoft SQL Server 到底在哪里2012 R2 Express? 客户希望使用“带有高级工具的 MS SQL Server R2”,2008 或 2012(最终甚至是 2014)。


由于您很可能会问到这个问题,因此我在此处附上了我的完整配置文件:

;SQL Server 2012 Configuration File

; DEVELOPER'S NOTE
; This file was obtained from the installer using the switches "/ACTION=Install /UIMODE=Normal" which yields the FULL set of wizard pages AND the ability to save a new configuration file.
; See also: https://technet.microsoft.com/en-us/library/ms144259%28v=sql.110%29.aspx

; Values that need to be changed before use:
;INSTANCENAME="{INSTANCENAME}"
;INSTANCEID="{INSTANCEID}"
;SQLSVCACCOUNT="NT Service\MSSQL${INSTANCENAME}"
;SQLSVCPASSWORD="{SQLSVCPASSWORD}"
;SQLSYSADMINACCOUNTS="{HOSTNAME}\Administrator"
;SAPWD="{SAPWD}"
;RSSVCACCOUNT="NT Service\ReportServer${INSTANCENAME}"
;FTSVCACCOUNT="NT Service\MSSQLFDLauncher${INSTANCENAME}"
;QUIETSIMPLE="True" -- I recommend you pass "/QS" to the installer rather than editing this value

[OPTIONS]
; Required to acknowledge acceptance of the license terms.
IACCEPTSQLSERVERLICENSETERMS="True"
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Detailed help for command line argument ROLE has not been defined yet.
;ROLE="AllFeatures_WithDefaults"
; Detailed help for command line argument ENU has not been defined yet.
ENU="True"
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
;UIMODE="Normal"
; Setup will not display any user interface.
;QUIET="False"
; Setup will display progress only, without any user interaction.
QUIETSIMPLE="False"
; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.
UpdateEnabled="False"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server Data Tools, and other shared components.
FEATURES=SQL,AS,RS,DQC,IS,MDS,Tools,SNAC_SDK
;FEATURES=SQLENGINE,REPLICATION,FULLTEXT,RS,BIDS,BOL,SSMS,SNAC_SDK
; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services.
UpdateSource="MU"
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="True"
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
X86="False"
; Specify the root installation directory for shared components. This directory remains unchanged after shared components are already installed.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components. This directory remains unchanged after WOW64 shared components are already installed.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS).
INSTANCENAME="{INSTANCENAME}"
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.
INSTANCEID="{INSTANCEID}"
; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature.
SQMREPORTING="False"
; RSInputSettings_RSInstallMode_Description
RSINSTALLMODE="DefaultNativeMode"
; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature.
ERRORREPORTING="False"
; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; Agent account name
AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Automatic"
; CM brick TCP communication port
COMMFABRICPORT="0"
; How matrix will use private networks
COMMFABRICNETWORKLEVEL="0"
; How inter brick communication will be protected
COMMFABRICENCRYPTION="0"
; TCP port used by the CM brick
MATRIXCMBRICKCOMMPORT="0"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Set to "1" to enable RANU for SQL Server Express.
ENABLERANU="True"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="NT Service\MSSQL${INSTANCENAME}"
SQLSVCPASSWORD="{SQLSVCPASSWORD}"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="{HOSTNAME}\Administrator"
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication.
SECURITYMODE="SQL"
SAPWD="{SAPWD}"
; Provision current user as a Database Engine system administrator for SQL Server 2012 Express.
ADDCURRENTUSERASSQLADMIN="True"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="1"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="1"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Disabled"
; Specifies which account the report server NT service should execute under.
RSSVCACCOUNT="NT Service\ReportServer${INSTANCENAME}"
; Specifies how the startup mode of the report server NT service.
RSSVCSTARTUPTYPE="Automatic"
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT="NT Service\MSSQLFDLauncher${INSTANCENAME}"

答案1

安装程序错误?

我认为这是由于安装程序错误造成的。我从您提到的链接下载了 SQL Server 2012 Express Advanced Edition 安装程序,并能够大致按照您的步骤操作,但我看到了明显的差异。

我的产品密钥屏幕与您的屏幕截图不同。我的下拉菜单中只列出了 Express,而不是“Evaluation”——我认为显示 Evaluation 表示您拥有的是 Standard(或其他)版本的安装程序。我的 SQL Server 2012 Express 上的产品密钥配置的屏幕截图

验证安装程序是否为不同文件的一种快速方法是比较哈希值。我在此文件上获得的 sha1 哈希值为 E1F8DEC35422A67E6733E53ED260CCE538E97EDC。FCIV 或 Get-FileHash(PowerShell 4.0?)是 Windows 上的两个示例。

但仅凭这一点还不足以解决问题,所以我继续进行完全无人值守的安装。首先,我像您一样创建了一个 ConfigurationFile.ini。

无人值守安装

SQLEXPRADV_x64_ENU.exe /ACTION=Install /UIMode=Normal

我跟着安装程序一直到安装程序的“准备安装”页面,该页面显示了它创建的 ConfigurationFile.ini 的路径。就我而言:

C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\<timestamp>\ConfigurationFile.ini

将此文件复制或保存到您想要的位置,并在关闭安装程序之前复制整个安装目录。如果您正在进行无人值守安装,您不会想每次都猜测和复制目录名称。我确实认为提取的安装目录 + setup.exe 是无人值守安装所必需的,我尝试直接使用 /CONFIGURATIONFILE 运行 SQLEXPRADV_x64_ENU.exe 却没有成功。

配置文件似乎没有保留任何指定的密码(在我的情况下只有 SAPWD,因为我在示例中启用了混合模式身份验证),因此需要随后将其添加到文件中或指定为命令行参数。

您将需要编辑 ConfigurationFile.ini 以设置 Quiet="True" 并注释掉 UIMode=Normal,因为对于无人值守安装,您通常不需要 GUI,如果没有它,它只会启动安装程序并等待用户输入。

;UIMODE="Normal"

; Setup will not display any user interface. 
QUIET="True"

或者,您可以使用 /? 参数调用 SQLEXPRADV_x64_ENU.exe 以获取完整的参数列表,以及底部的无人值守示例,用于在不使用配置文件的情况下进行安装,只需手动传递所需的选项。其示例指定了 setup.exe,因此我认为上述关于需要提取目录的说法是正确的。它真的很长,所以我没有把它写在我的答案中。这些也是记录在这里,因此可以手动创建文件。请注意,链接可能包含 Express 中不可用的选项。

最后,将安装程序和配置文件复制到目标机器,并对配置文件进行任何所需的修改:

setup.exe /CONFIGURATIONFILE=c:\path\to\myConfigurationFile.ini /IAcceptSQLServerLicenseTerms /SAPWD="****************"

值得注意的是 /IAcceptSQLServerLicenseTerms 很重要,如果你忽略它,它会告诉你必须指定它。你可以在 .ini 中指定它,但我没有测试过。*** 代替了我的测试 SA 密码。如果你不启用混合模式或向配置文件添加任何 PW,那部分可能就没有必要了。

验证 Express 版本

然后我找到了一个很酷的脚本来告诉你你的 SQL Server 服务器的版本(和版本)在 Technet 上因为我不知道如何在安装后真正验证我的版本,因为最初的问题是因为它似乎安装的是标准版而不是 Express 版。我承认,如果从 MS 下载的 Express 安装程序最终安装的是另一个版本,我会非常惊讶。

这部分当然不是必要的,但是直接链接在这里

这是我在我的案例中得到的输出:

---------------------------------------------------------------------------------------------------------
--//Your current Microsoft SQL Server information:
---------------------------------------------------------------------------------------------------------
Product Version:          11.0.2100.60
Product Name:             SQL Server 2012
Product Level:            RTM 
Product Edition:          Express Edition (64-bit)
---------------------------------------------------------------------------------------------------------
Note, if you want to know information about CU, please read this KB below.
KB321185, <https://support.microsoft.com/en-us/kb/321185>
---------------------------------------------------------------------------------------------------------
Support Lifecycle stage: Mainstream Support Phase, however security/non-security updates are not available for
current 2012 baseline. Upgrade to SP2 for security/Non-security updates. For additional information refer to:
https://support.microsoft.com/en-us/lifecycle/search?sort=PN&alpha=SQL%20Server&Filter=FilterNO, and Q6, Q18
in the FAQ section of Support Lifecycle page at: https://support.microsoft.com/en-us/lifecycle#gp/lifePolicy
---------------------------------------------------------------------------------------------------------
Full information:
Microsoft SQL Server 2012 - 11.0.2100.60 (X64) 
    Feb 10 2012 19:39:15 
    Copyright (c) Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)

---------------------------------------------------------------------------------------------------------
--//Recommended updates: 
--### RTM -> QFE or GDR
--### SP  -> QFE or GDR
--### QFE -> QFE
--### GDR -> GDR or QFE
---------------------------------------------------------------------------------------------------------
Install the latest service pack:              SP3, <https://support.microsoft.com/en-us/kb/3072779>

---------------------------------------------------------------------------------------------------------
###### QFE branch updates
---------------------------------------------------------------------------------------------------------
11.0.2376 (SQL Server 2012 RTM QFE) http://support.microsoft.com/en-us/kb/2716441
11.0.3513 (SQL Server 2012 SP1 QFE) https://support.microsoft.com/en-us/kb/3045317
11.0.5613 (SQL Server 2012 SP2 QFE) https://support.microsoft.com/en-us/kb/3045319
---------------------------------------------------------------------------------------------------------
###### GDR branch updates
---------------------------------------------------------------------------------------------------------
11.0.2218 (SQL Server 2012 RTM GDR) https://support.microsoft.com/en-us/kb/2716442
11.0.3153 (SQL Server 2012 SP1 GDR) http://support.microsoft.com/kb/2977326/en-us
11.0.3156 (SQL Server 2012 SP1 GDR) https://support.microsoft.com/en-us/kb/3045318
11.0.5343 (SQL Server 2012 SP2 GDR) https://support.microsoft.com/en-us/kb/3045321
---------------------------------------------------------------------------------------------------------
Note, if you don’t want to upgrade to latest service pack right now, we recommend you install the latest
Cumulative Update CU11 of SQL Server 2012 RTM.
Install the latest Cumulative Update (CU) of RTM: CU11, <https://support.microsoft.com/en-us/kb/2908007>


---------------------------------------------------------------------------------------------------------
--//You can upgrade to any of the following product(s):
---------------------------------------------------------------------------------------------------------
If you want to upgrade to higher edition, please intall service pack.


For additional information about supported version and edition upgrades refer to:
https://technet.microsoft.com/en-us/library/ms143393(v=sql.120).aspx

相关内容