Moh*_*yan 1 sql-server-2008 sql-server installation sql-server-express
我想在安静模式下安装 SQL Server Express 2008。
我知道我们可以使用/ConfigurationFile="ConfigurationFile.INI"参数从配置文件安装 SQL Server。
以下是我的Configuration.ini文件:
;SQLSERVER2008 Configuration File
[SQLSERVER2008]
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will reflect the instance ID of the SQL Server instance.
INSTANCEID="SQLEXPRESS"
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
;License Terms
IACCEPTSQLSERVERLICENSETERMS = "True"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components.
FEATURES=SQLENGINE
; Displays the command line parameters usage
HELP="False"
; The directory for the extracted service pack files used to update the setup media.
; PCUSOURCE=""
; Specify the root installation directory for native shared components.
; INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only without any user interaction.
QUIETSIMPLE="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 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 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"
; 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="SQLEXPRESS"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Manual"
; Startup type for Integration Services.
ISSVCSTARTUPTYPE="Automatic"
; Account for Integration Services: Domain\User or system account.
ISSVCACCOUNT="NT AUTHORITY\NetworkService"
; Controls the service startup type setting after the service has been created.
ASSVCSTARTUPTYPE="Automatic"
; The collation to be used by Analysis Services.
ASCOLLATION="Latin1_General_CI_AS"
; The location for the Analysis Services data files.
ASDATADIR="Data"
; The location for the Analysis Services log files.
ASLOGDIR="Log"
; The location for the Analysis Services backup files.
ASBACKUPDIR="Backup"
; The location for the Analysis Services temporary files.
ASTEMPDIR="Temp"
; The location for the Analysis Services configuration files.
ASCONFIGDIR="Config"
; Specifies whether or not the MSOLAP provider is allowed to run in process.
ASPROVIDERMSOLAP="1"
; 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 AUTHORITY\NETWORK SERVICE"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication.
SECURITYMODE="SQL"
;
SAPWD="mds134"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="0"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="0"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Disabled"
; Specifies how the startup mode of the report server NT service. When
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled
RSSVCSTARTUPTYPE="Automatic"
; Specifies which mode report server is installed in.
; Default value: “FilesOnly”
RSINSTALLMODE="FilesOnlyMode"
Run Code Online (Sandbox Code Playgroud)
我把它放在SQLEXPR_x86_ENU.exe文件旁边。但正如你所知SQLEXPR_x86_ENU.exe,它是压缩的,必须被提取出来。
我的问题是:解压后SQLEXPR_x86_ENU.exe,提示找不到Configuration.ini!
我怎样才能绕过这个问题?
谢谢
我相信您必须指定文件的完整路径,例如C:\Temp\Configuration.ini- 否则 SQL Server 安装程序会尝试在安装程序的提取文件夹中找到它,通常是C:\some_big_long_gui\.
您还有一些配置选项(例如IAcceptSQLServerLicenseTerms),它们对您使用的版本无效(该版本是在 SQL Server 2008 R2 中专门添加的)。我能够使用以下配置文件成功安装 SQL Server 2008 Express(我删除了 Express 不必要的 SSAS / SSRS / SSIS 选项、所有详细注释和无效条目):
[SQLServer2008]
INSTANCEID="SQLEXPRESS"
ACTION="Install"
FEATURES=SQLENGINE
HELP="False"
INDICATEPROGRESS="False"
X86="False"
ERRORREPORTING="False"
SQMREPORTING="False"
INSTANCENAME="SQLEXPRESS"
SQLSVCSTARTUPTYPE="Automatic"
ENABLERANU="True"
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
SECURITYMODE="SQL"
ADDCURRENTUSERASSQLADMIN="True"
SAPWD="mds134"
TCPENABLED="0"
NPENABLED="0"
BROWSERSVCSTARTUPTYPE="Disabled"
Run Code Online (Sandbox Code Playgroud)
以及以下命令行:
SQLEXPR_x86_ENU.exe /QS /ConfigurationFile="C:\Temp\Configuration.ini"
Run Code Online (Sandbox Code Playgroud)
您必须指示您的用户为此指定路径。您可以将此作为引导程序的参数,但我不知道有什么方法可以让安装程序在不指定显式路径的情况下找到您的配置文件。如果您告诉您的用户将 exe 和 ini 文件复制到同一个文件夹,我相信您的包装器可以找出必要的命令行。否则,您的用户将不得不帮助确定路径。
另一种选择是只使用大量命令行,而不是根本不使用配置文件。无论如何,这似乎在设置过程中少了两个步骤(确保已复制 ini 文件并确定它的位置)。除非目的是允许用户使用配置文件更改某些参数。我认为这些可能应该在您使用包装器部署的配置文件中,而不是 Express 的配置文件中。
如果您正在构建一个新的应用程序来部署 SQL Server,为什么不使用 SQL Server 2012?我不确定它是否克服了配置文件问题(此页面似乎暗示它不是必需的,但我在 2008 或 2012 中没有成功),但至少您将使用更新的版本,更多功能和更长的支持时间,更可预测的命令行参数(我没想到它们会在 2008 和 2008 R2 之间发生变化),并且数据库对于安装的引擎版本来说太现代的可能性更小。
| 归档时间: |
|
| 查看次数: |
17639 次 |
| 最近记录: |