Sql-server – Installing SQL Server 2008 Express Edition in quiet mode issue

installationsql serversql-server-2008sql-server-express

I want to install SQL Server Express 2008 in quiet mode.

I know that we can use /ConfigurationFile="ConfigurationFile.INI" parameter to install SQL Server from a configuration file.

The following is my Configuration.ini file :

;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"

That I placed it beside of SQLEXPR_x86_ENU.exe file. But as you know SQLEXPR_x86_ENU.exe is compressed and it must be extracted.

My issue is : after extracting SQLEXPR_x86_ENU.exe, it alerts that it couldn't find Configuration.ini !

How can I bypass this issue ?

Thanks

Best Answer

I believe you must specify the full path to the file, e.g. C:\Temp\Configuration.ini - otherwise SQL Server setup tries to find it in the extraction folder for the setup, which is typically C:\some_big_long_gui\.

You also have some configuration options (such as IAcceptSQLServerLicenseTerms) which are not valid for the edition you're using (that one specifically was added in SQL Server 2008 R2). I was able to install SQL Server 2008 Express successfully using the following configuration file (I removed unnecessary SSAS / SSRS / SSIS options for Express, all the verbose comments, and the invalid entries):

[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"

And the following command line:

SQLEXPR_x86_ENU.exe /QS /ConfigurationFile="C:\Temp\Configuration.ini"

You will have to instruct your users to specify the path for this. You can make this an argument to your bootstrapper, but I don't know of a way to have setup find your configuration file without specifying an explicit path for it. If you tell your users to copy both the exe and the ini file to the same folder, I'm sure your wrapper could figure out the command line necessary. Otherwise your users will have to lend a hand in determining the path.

Another option would be to just use a massive command line instead of using a configuration file at all. This seems to be two less steps in the setup process anyway (ensuring that the ini file has been copied and determining where it is). Unless the purpose is to allow users to change some arguments using the config file. I think those should perhaps be in a config file you deploy with the wrapper instead of the config file for Express.

If you're building a new application to deploy SQL Server, why aren't you using SQL Server 2012? I'm not sure it overcomes the configuration file issue (this page seems to imply it isn't required, but I was not successful with 2008 or with 2012), but at least you'll be using a much more recent version, with more features and a longer support sunset, more predictable command-line arguments (I did not expect them to change between 2008 and 2008 R2), and less chance that a database will be too modern for the version of the engine installed.