How to Deploy SQL Server 2008
This page describes how to deploy SQL Server 2008 using BMC Server Automation. For information on deploying to a clustered environment, see How to Deploy SQL Server 2008 R2 Cluster.
Silent installation information for SQL Server 2008 R2 NON-Cluster
Parameter/INI file changes/additions necessary for unattended deployments:
- Set QUIET="True"
- Comment out UIMODE (place a semi-colon in front of it)
- Comment out ADDCURRENTUSERASSQLADMIN (place a semi-colon in front of it)
- Add IACCEPTSQLSERVERLICENSETERMS="True"
psexec is not required to call the "setup.exe" command via BladeLogic, as long as system accounts are selected for the various SQL service startup accounts. However, if named accounts are used, the SQL install will fail attempting to add the password values to the XML file it creates for unattended responses during the install process. Utilize the '-u' & '-p' options to provide domain account credentials for psexec to use. The '-h' option may also be necessary to have psexec execute the command with elevated privileges. If named accounts are used, the following parameter/INI file additions are necessary:
Another set of instructions:
blcli_connect blcli_execute PropertyClass getDefaultValue Class://SystemObject SQLSVCPASSWORD AGTSVCPASSWORD ASSVCPASSWORD ISSVCPASSWORD RSSVCPASSWORD blcli_storeenv ENC_PWD blcli_execute Property decryptPropertyValue $ENC_PWD do Setup.exe /SQLSVCPASSWORD="$SQLSVCPASSWORD" /AGTSVCPASSWORD="$AGTSVCPASSWORD" /ASSVCPASSWORD="$ASSVCPASSWORD" /ISSVCPASSWORD="$ISSVCPASSWORD" /RSSVCPASSWORD="$RSSVCPASSWORD" /ConfigurationFile=MyConfigurationFile.INI done blcli_disconnect
Silently installing SQL Server 2008
How to perform a silent unattended install of SQL Server 2008 R2 (Standard or Enterprise) using a configuration file.
With the instructions below, you’ll be able to create a new customized SQL silent installation in minimal time. Note that the configuration below does not work with the Express edition of SQL Server 2008 R2.
- Run setup.exe.
- Click the Installation tab
- Click New Installation.
- Go through the wizard. Enter product key, accept license, install setup support files, and select the features that you want to install:
- Continue the installation until you reach the Ready To Install step. Notice the path to the configuration file highlighted below in blue.
- Now that you have the configuration file, copy it to your own folder or network share where you want to start the unattended installation.
- Cancel setup since we’re interested in the unattended silent mode of installation; not the UI one.
- Edit the configuration file as follows:
- Set QUIET to “True”. This specifies that Setup will run in a quiet mode without any user interface (i.e. unattended installation).
- Set SQLSYSADMINACCOUNTS to “BUILTIN\ADMINISTRATORS”. This will ensure that administrators on the machine are added as members of the sysadmin role. You can set its value based on your needs (Ex: SQLSYSADMINACCOUNTS=”domain\YourUser”), but this is the more generic approach.
- Add PID and set its value to your product license key. If your setup.exe already comes preloaded with the key, there is no need to add this option to the configuration file.
- Add IACCEPTSQLSERVERLICENSETERMS and set its value to “True”. This is to required to acknowledge acceptance of the license terms when the /Q (that is, QUIET) parameter is specified for unattended installations.
- Remove the ADDCURRENTUSERASSQLADMIN parameter. The reason is that this parameter can’t be used when SQLSYSADMINACCOUNTS is specified, and it only applies to Express installations.
- Remove the UIMODE parameter as it can’t be used with the QUITE parameter.
- Remove INSTALLSHAREDDIR, INSTALLSHAREDWOWDIR, INSTANCEDIR parameters since we want to install on the default installation directories.
- If you want to change the features that this setup will install, there is no need to go with the full steps again. You can simply change the value for the FEATURES parameter. For example, the features I selected (shown in first screenshot above) will generate FEATURES=SQLENGINE,SSMS,ADV_SSMS in the configuration file. You can change that based on your needs. The full list of available feature parameters and their descriptions is located here.
- After getting the configuration file ready, you’ll need to run setup.exe passing the configuration file as a parameter.
"<path to SQL setup folder>\setup.exe"/ConfigurationFile="<path to config 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="MSSQLSERVER" ; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. ACTION="Install" ; 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,FULLTEXT,CONN,BC,SDK,BOL,SSMS,ADV_SSMS,SNAC_SDK ; Displays the command line parameters usage HELP="False" ; 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="False" ; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. X86="False" ; Specifies the path to the installation media folder where setup.exe is located. MEDIASOURCE="F:\" ; 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="C:\Program Files\Microsoft SQL Server" ; Specify the root installation directory for the WOW64 shared components. INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" ; Specify the installation directory. INSTANCEDIR="C:\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="MSSQLSERVER" ; Agent account name AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" ; 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="False" ; 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\SYSTEM" ; Windows account(s) to provision as SQL Server system administrators. SQLSYSADMINACCOUNTS="BL-APPSERVER\Administrator" ; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication. SECURITYMODE="SQL" ; Provision current user as a Database Engine system administrator for SQL Server 2008 Express. ADDCURRENTUSERASSQLADMIN="False" ; 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="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" ; Add description of input argument FTSVCACCOUNT FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
Next, use the relevant silent installation parameters (depending on the version you are deploying) when creating a Software package in the Depot.
SQL Server 2008/2012 Native Client
SQL Server 2008 R2 Service Pack 1 Silent Install
SQL Server 2008 R2 Cumulative Update 5
SQL Server 2008 R2 Management Studio
Create a Deploy Job, and test deploying your SQL Server Software Package against one or more test servers.