Silent install of SQL Server 2008

Are you having trouble installing SQL Server 2008 from the command prompt? I tried installing SQL Server Express 2008 by looking at the reference on MSDN. The trouble was it kept failing time and again and the screen disappeared faster than you can see what the error message was. Fortunately, the installer creates a Summary.txt file in the folder C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log. Opening the file will tell you exactly what the error message is.

But sometimes even this isn’t enough. In my case,  I was quickly able to find that I needed PowerShell for installing SQL Server Express with Advanced Services – which was quickly fixed, but it kept failing with this exception -

Exception type: 
Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException Message: No features were installed during the setup execution.
The requested features may already be installed.
Please review the summary.txt log for further details.

Our friend Google wasn’t of much help, so I decided to do a non-command line install to see if it was installing in the machine. It turns out, once you manually set all the configuration information, the installer creates a file called ConfigurationFile.ini and puts those settings there. This shows up in the Ready to Install step  -

image

The installer then uses this file to do the actual install. Now, if you open the configuration file, you will find that these are the same settings you can set from the Command line. It looks something like this -

;SQLSERVER2008 Configuration File
[SQLSERVER2008]

; Specify the Instance ID for the SQL Server features ...

INSTANCEID="SQLExpress"

; Specifies a Setup work flow, like INSTALL, UNINSTALL, ...

ACTION="Install"

; Specifies features to install, uninstall, or upgrade ...
FEATURES=SQLENGINE,RS

...
...

You can then add all the name value pairs together to get the right command line arguments. Like so –

SQLEXPRADV_x64_ENU.exe /QUIET /INSTANCEID="SQLExpress" 
/ACTION="Install" /FEATURES=SQLENGINE,RS ...

There you have it – the right command line parameters to install SQL Server 2008 Express with Advanced Services silently from the command prompt. You can choose to remove some of the parameters that have default values or just leave them as they are – it doesn’t really matter.

About these ads

~ by blogesh on September 23, 2008.

29 Responses to “Silent install of SQL Server 2008”

  1. I have tried what have you told here.Like i took the configuration file from my manual installation. But could you give me command to install. I tried by the command “C:\SQLEXPR.EXE /qb /settings c:\SQL2005.ini” Dint work gave some setting syntax error. Could you give me a solution for this. I am attaching my summary File.

    Overall summary:
    Final result: Failed: see details below
    Exit code (Decimal): -2068578301
    Exit facility code: 1204
    Exit error code: 3
    Exit message: The setting ‘SETTINGS’ specified is not recognized.
    Start time: 2009-01-15 16:14:12
    End time: 2009-01-15 16:14:31
    Requested action: LandingPage

    Machine Properties:
    Machine name: mymachine
    Machine processor count: 2
    OS version: Windows XP
    OS service pack: Service Pack 2
    OS region: United States
    OS language: English (United States)
    OS architecture: x86
    Process architecture: 32 Bit
    OS clustered: No

    Package properties:
    Description: SQL Server Database Services 2008
    SQLProductFamilyCode: {628F8F38-600E-493D-9946-F4178F20A8A9}
    ProductName: SQL2008
    Type: RTM
    Version: 10
    SPLevel: 0
    Installation edition: Invalid

    User Input Settings:
    ACTION: LandingPage
    CONFIGURATIONFILE:
    HELP: False
    INDICATEPROGRESS: False
    MEDIASOURCE:
    QUIET: False
    QUIETSIMPLE: False
    X86: False

    Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20090115_161355\ConfigurationFile.ini

    Detailed results:

    Rules with failures:

    Global rules:

    There are no scenario-specific rules.

    Rules report file: The rule result report file is not available.

    Exception summary:
    The following is an exception stack listing the exceptions in outermost to innermost order
    Inner exceptions are being indented

    Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidationException
    Message:
    The setting ‘SETTINGS’ specified is not recognized.
    Data:
    DisableWatson = true
    Stack:
    at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveParsedArgumentsIntoInputSettingStore(InputSettingSource source, Dictionary`2 parsedArguments, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)
    at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.ProcessCommandLineArguments(String[] commandLineArguments, Boolean chainerSetting)
    at Microsoft.SqlServer.Configuration.BootstrapExtension.ProcessChainerCommandLineArgumentsAction.ExecuteAction(String actionId)
    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)

  2. In configuration file, i dont see any password fields, should we give those passwords in Command line and i need the syntax of the command.

  3. For sql server 2008 “settings syntax is not correct”
    Use:
    C:\SQLEXPR.EXE /ConfigurationFile=C:\ConfigurationFile.ini /Q

  4. Hi,

    I tried installing the application “SQL Server 2008 express edition” SIlently…
    But the below command didnt work..

    Setup.exe \Configurationfile “SEtup.ini” /q
    also tried
    setup.exe \config “Setup.ini” /q
    setup.exe \config “Setup.ini”

    But nothing helped…
    Please help me regarding the same…

    • place your sql dvd in your cd-rom
      f = your dvd/cd drive
      in command promp type
      f:\setup.exe /qn /instancename=YOURFAVORITENAME /sapwd=YOURPASSWORD

      for more information you can type in command prompt
      :

      f:\setup.exe /?

    • You can call direct sqlexpr_x86_…exe from the right path for exe:
      sqlexpr_x86_enu.exe /CONFUGURATIONFILE=”Setup.ini”

  5. Hi,
    Thanks for the tip on the configuraton.ini file.
    I have attempted to use this method, but each time I receive an error advising that the configuration file is not located in the temporary folder that the SQL Install creates to install from.

    Are you able to tell me how to overcome this?

    Cheers,
    Mark

  6. Hi,

    Is there a flag to check if silent installation passed or failed? What is the best way to check if the silent install passed or failed?

    Thanks

  7. Checking install:
    the key place to check is %Programfiles%\Microsoft sql server\100\Setup bootstrap\Log\. To begin, open the Summary__.txt file to see an overview of the results. If that doesn’t help, consider reviewing one of the Detail*.txt files. These errors are all addressed in KB909967 – How to troubleshoot SQL Server 2008 Setup issues.

  8. I wrote a blog on SQL 2008 R2 unattended setup you can check out here:

    http://derek858.blogspot.com/2010/07/unattended-sql-2008-r2-scripts.html

  9. I’ve tried to do this, but in my setup (SQL Server 2008 Express edition) no “Ready to Install” is presented.
    Is there another way to create this file (preferably automatically)?

  10. Same here, I don’t see a Ready To Install step and I can’t find a Configuration.ini file anywhere. Furthermore, when I attempt to hand create a config file I get an error when I attempt to execute SQLEXPR32_x86_ENU.exe /CONFIGURATIONFILE=”Install.ini”: error: The configuration file ‘c:\____\Install.ini’ does not exist. Specify a valid configuration file. Error code 0x84B40000. Not sure why it can’t find the file. There must be a way to specify a file that is not in the root of the C:\ drive. What a stupid default path for config files.

  11. Just blogged http://wellytonian.com/2010/08/sql-server-2008-r2-unattended-installation/

  12. Also added SQL 2008 R2 Sysprep Guide

    http://wellytonian.com/2010/10/sql-2008-r2-sysprep-and-installation/

  13. Many of my customers have already some version of SQL Server on their computer. The installation is therefor often aborted, because the installer wants you the update the current installation. This means the already partly installed new SQL Server remains installed (including my own INSTANCE). In order to install my own instance of SQL Server (latest version) I have to manually uninstall the previous installation and even remove some registry entries pointing to my instance. Then I can upgrade the old SQL Server and after that I can install my own instance.
    I would be nice if this could be handled by the initial installer (ask if current server must be updated).
    Or maybe there is a way to ignore all of this and just install the instance of the newer version of SQL Server.

  14. thanks for all information

    here are steps + example in powershell :

    1) install sql serveur express manually with this command to force .ini file install :
    SQLEXPR_x64_ENU.exe /ACTION=INSTALL /UIMODE=Normal

    2) save CONFIGURATIONFILE.ini in another folder

    3) uninstall sql server (delete all folder, registry key with ccleaner for example)

    4) in powershell window, execute the following command to install sql server in silence mode :

    & “T:\SQLEXPRADV_x64_ENU.exe” /CONFIGURATIONFILE=”T:\ConfSetupSql2008Express.ini”

    5) ConfSetupSql2008Express.ini is :

    ;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=”Uninstall”

    ; 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,REPLICATION,FULLTEXT,RS,BIDS,SSMS,SNAC_SDK,OCS

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

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

    ; 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 root installation directory for native shared components.

    INSTALLSHAREDDIR=”E:\Program Files\Microsoft SQL Server”

    ; Specify the root installation directory for the WOW64 shared components.

    INSTALLSHAREDWOWDIR=”E:\Program Files (x86)\Microsoft SQL Server”

    ; Specify the installation directory.

    INSTANCEDIR=”E:\Program Files\Microsoft SQL Server”

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

    ; Agent account name

    AGTSVCACCOUNT=”AUTORITE NT\SERVICE RÉSEAU”

    ; Auto-start service after installation.

    AGTSVCSTARTUPTYPE=”Disabled”

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

    ; A port number used to connect to the SharePoint Central Administration web application.

    FARMADMINPORT=”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=”French_CI_AS”

    ; Account for SQL Server service: Domain\User or system account.

    SQLSVCACCOUNT=”MyUserSQLSrv”

    ; Windows account(s) to provision as SQL Server system administrators.

    SQLSYSADMINACCOUNTS=”MyUserAdm”

    ; The default is Windows Authentication. Use “SQL” for Mixed Mode Authentication.

    SECURITYMODE=”SQL”

    ; Default directory for the Database Engine backup files.

    SQLBACKUPDIR=”S:\VUR\MSSQL10_50.SQLEXPRESS\MSSQL\BACKUP”

    ; Default directory for the Database Engine user database logs.

    SQLUSERDBLOGDIR=”J:\VUR\MSSQL10_50.SQLEXPRESS\MSSQL\Data”

    ; Directory for Database Engine TempDB files.

    SQLTEMPDBDIR=”H:\VUR\MSSQL10_50.SQLEXPRESS\MSSQL\Data”

    ; Provision current user as a Database Engine system administrator for SQL Server 2008 R2 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=”0″

    ; Startup type for Browser Service.

    BROWSERSVCSTARTUPTYPE=”Automatic”

    ; Specifies which account the report server NT service should execute under. When omitted or when the value is empty string, the default built-in account for the current operating system.
    ; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
    ; The domain part of RSSVCACCOUNT is a maximum of 254 characters long.

    RSSVCACCOUNT=”MyUserSSRS”
    RSSVCPASSWORD=”myPassword”

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

    ; Add description of input argument FTSVCACCOUNT

    FTSVCACCOUNT=”NT AUTHORITY\LOCAL SERVICE”

    ; licence terms

    IACCEPTSQLSERVERLICENSETERMS=”True”

    ; Specifies the path to the installation media folder where setup.exe is located.
    ;MEDIASOURCE=”T:\”

    ; Parameter that controls the user interface behavior. Valid values are Normal for the full UI, and AutoAdvance for a simplied UI.
    ;UIMODE=”Normal”

    ; Setup will not display any user interface.
    ;QUIET=”False”

    ; Setup will display progress only without any user interaction.
    QUIETSIMPLE=”True”

    ; password sql server connexion
    SAPWD=”myPassword”

    6) powershell command with parameter :

    in powershell window, fill this

    C:\InstallSqlServer2008.ps1 “T:\SQLEXPRADV_x64_ENU.exe” “T:\ConfSetupSql2008Express.ini”

    in InstallSqlServer2008.ps1 file :

    Write-Host “– installing slq server express 2008 r2 extended…”

    $fileExe = $args[0]
    $CONFIGURATIONFILE = $args[1]
    & $fileExe /CONFIGURATIONFILE=$CONFIGURATIONFILE

  15. another question : how to catch the end of sql server installation and display return code installation ?

    • in according to execute this following powershell script :

      & “T:\SQLEXPRADV_x64_ENU.exe” /CONFIGURATIONFILE=”T:\ConfSetupSql2008Express.ini”

  16. I am trying to run the script to install SQL Server 2008 R2 remotely, but it does not work. When I run the script locally on the machine the install starts, but not when I attempt to run the script remotely. Can you tell me what I am doing wrong or what I am missing in order to get this to work?

  17. [...] I am trying to build an .ini file for unattended installations of SQL Server 2008 R2. I followed this blog post to build an initial .ini file: http://blogesh.wordpress.com/2008/09/23/silent-install-of-sql-server-2008/ [...]

  18. Sorry for asking the question in a closed topic but how could I set the sa password?

  19. Hiiiii……

    While trying to install sql 2008r2 silent mode instalation in windows 2003 server or windows 2008 it throws the error : Sql server setup has encountered following error is not a valid value for setting ‘ACTION’
    ERROR CODE:0X84B40000.

    and with the same setup and same configuration file i installed in windows7 successfully…….

    Pls let me know the solution ASAP

  20. Wow what a great post. This surely saved me days. Thanks for the brilliant suggestion to let the wizard write the command.

  21. Hi Mahesh,
    if you’re interested I wrote a complete powershell example here:
    http://www.ludovicocaldara.net/dba/sqlserver-2008r2-unattended-installation-and-configuration-via-powershell/

    Best regards

  22. Hi! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in trading links
    or maybe guest authoring a blog article or
    vice-versa? My website covers a lot of the same topics as yours
    and I believe we could greatly benefit from each other. If you’re interested feel free to send me an e-mail. I look forward to hearing from you! Awesome blog by the way!

  23. hi i want to install sql express 2012 64 bit bit in silent i would like to use this script in sccm server to deploy clients kindly help me out with full script

  24. Download here MSSQL EXPRESS 2008 r2 silent installation with config.ini, easy to install.. download here: http://im.st/rAPN5

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: