To use a configuration file to install a standalone SQL Server instance, run the installation through the command-line setup.exe program and supply the ConfigurationFile.ini using the Co
Trang 1; 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=”True”
; Specify the root installation directory for native shared components
INSTALLSHAREDDIR=”C:\Program Files\Microsoft SQL Server”
; Specify the installation directory
INSTANCEDIR=”C:\SQL2008R2”
; 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=”True”
; 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=”SQLADMIN”
; Auto-start service after installation
AGTSVCSTARTUPTYPE=”Automatic”
; Startup type for Integration Services
ISSVCSTARTUPTYPE=”Automatic”
; Account for Integration Services: Domain\User or system account
ISSVCACCOUNT=”SQLADMIN”
; Startup type for the SQL Server service
SQLSVCSTARTUPTYPE=”Automatic”
; Level to enable FILESTREAM feature at (0, 1, 2 or 3)
FILESTREAMLEVEL=”1”
; 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=”SQLADMIN”
Trang 2; Windows account(s) to provision as SQL Server system administrators
SQLSYSADMINACCOUNTS=”SQLADMIN”
; The default is Windows Authentication Use “SQL” for Mixed Mode Authentication
SECURITYMODE=”SQL”
; The Database Engine root data directory
INSTALLSQLDATADIR=”C:\SQL2008R2”
; Default directory for the Database Engine backup files
SQLBACKUPDIR=”C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Backup”
; Default directory for the Database Engine user databases
SQLUSERDBDIR=”C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Data”
; Default directory for the Database Engine user database logs
SQLUSERDBLOGDIR=”C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Data”
; Directory for Database Engine TempDB files
SQLTEMPDBDIR=”C:\SQL2008R2\MSSQL10_50.MSSQLSERVER\MSSQL\Data”
; Provision current user as a Database Engine system administrator for
SQL Server 2008 R2 Express
ADDCURRENTUSERASSQLADMIN=”False”
; 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”
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT=”NT AUTHORITY\LOCAL SERVICE”
Depending on which options you chose during an install, other options may be listed in
the Configuration.ini file, some of which are designed solely for clustered installs,
Analysis Services, Reporting Services, Integration Services, or Tools
To create a configuration file (sorry, no configuration file template is available on the
installation media), run the installation program and follow the wizard all the way
through to the Ready to Install page where the location of the Configuration.ini file
generated is specified (see Figure 8.21) If you do not want to continue with an actual
Trang 3installation at this point, simply click the Cancel button to cancel the setup At this point,
you can copy the Configuration.ini file to another location so you can make edits to it
NOTE
The Installer writes out all the appropriate parameters for the options and values
speci-fied, with the exception of sensitive information such as passwords For an unattended
install, these values can be provided at the command prompt when you run
setup.exe In addition, the new SQL Server 2008 R2
/IAcceptSQLServerLicenseTerms parameter is also not written out to the
configura-tion file and requires either you modify the configuraconfigura-tion file or supply a value at the
command prompt
The setup.exe command-line program can be found at the root level of the installation
media To use a configuration file to install a standalone SQL Server instance, run the
installation through the command-line setup.exe program and supply the
ConfigurationFile.ini using the ConfigurationFile parameter, as in the following
example:
Setup.exe /ConfigurationFile=CustomConfigurationFile.INI
If you want to override any of the values in the configuration file or provide values not
specified in the configuration file, you can provide additional command-line parameters
to setup.exe For example, to avoid having to enter the service account passwords during
the installation, you can enter them on the command line using the password parameters
to config.exe:
Setup.exe /SQLSVCPASSWORD=”mypassword” /AGTSVCPASSWORD=”mypassword”
/ASSVCPASSWORD=”mypassword” /ISSVCPASSWORD=”mypassword”
/RSSVCPASSWORD=”mypassword” /ConfigurationFile=CustomConfigurationFile.INI
NOTE
The password parameters are required to run a fully unattended installation Also, if
the SECURITYMODE setting is set to SQL in the configuration file or via the
command-line parameter, you need to provide the /SAPWD parameter to provide a password for
the sa account
Most of the other available setup.exe command-line parameters are the same as the
para-meter names used in the configuration file as listed previously For full details of the
avail-able setup.exe parameters, refer to SQL Server Books Online
Trang 4Running an Automated or Manual Install
When installing SQL Server from the command prompt, you can also specify what level of
the installer interface you want to run, either silent, basic, or full interaction SQL Server
supports full quiet mode by using the /Q parameter or Quiet Simple mode by using the
/QS parameter The /Q switch is intended for running unattended installations With this
switch provided, Setup runs in quiet mode without any user interface The /QS switch
only shows progress via the GUI; it does not accept any input and displays no error
messages if encountered
Regardless of the installation method chosen, you are required to confirm acceptance of
the software license terms as an individual or on behalf of an entity, unless your use of the
software is governed by a separate agreement such as a Microsoft volume licensing
agree-ment or a third-party agreeagree-ment with an ISV or OEM For full unattended installations
(using the /Q or /QS parameters) with SQL Server 2008 R2, you must include the
/IACCEPTSQLSERVERLICENSETERMS parameter to avoid the display of the License Terms
page Following is a sample command line for running an unattended installation of SQL
Server 2008:
C:\Documents and Settings\rrankins\My Documents\Downloads\SQL2008\R2
Nov CTP>setup.exe /configurationfile=customconfigurationfile.ini
/Q /IACCEPTSQLSERVERLICENSETERMS /SQLSVCPASSWORD=”riddler”
/AGTSVCPASSWORD=”riddler” /SAPWD=”riddler”
SQL Server 2008 R2 introduces a new option to the setup.exe that allows you to run a
somewhat more attended mode of the installation that gives you a bit more control over
the install than the /Q and /QS parameters, while streamlining the install somewhat You
can now specify the /UIMODE parameter instead of the /Q or /QS switches The /UIMODE
parameter specifies whether to present the full set of Installer Wizard pages for review and
confirmation while running the setup or to present a minimum number of pages during
setup /UIMODE=Normal, the default option, presents all setup dialog boxes for the selected
features, allowing you to review the values or manually enter values not provided in the
configuration file (such as service account passwords) You can specify the
/UIMODE=AutoAdvance option to skip nonessential dialogs and auto advances through a
number of pages, including the Ready to Install page
NOTE
Although SQL Server 2008 Configuration.ini files are compatible with the SQL
Server 2008 R2 setup.exe program, some of the options generated in a SQL Server
2008 R2 Configuration.ini file are not compatible with the pre-R2 installer, such as
the ENU, UIMODE, FARMADMINPORT, and IACCEPTSQLSERVERLICENSETERMS parameters
Trang 5Installing Service Packs and Cumulative Updates
If you are installing SQL Server 2008 instead of SQL Server 2008 R2, it is recommended that
you install SQL Server 2008 Service Pack 1 SQL Server 2008 SP1 doesn’t provide any
signif-icant new features for SQL Server 2008 but does provide a number of fixes to the GA release
version of SQL Server 2008 (Microsoft Knowledge Base article 968369 lists all the fixes)
Service Pack 1 does provide a few new features primarily to ease the deployment of service
packs and cumulative updates The first of these is Slipstream installations Slipstreaming is
an installation method that integrates the base installation files for SQL Server with its
service packs and cumulative updates and enables you to install them in a single step You
can slipstream SQL Server 2008 SP1 and subsequent cumulative updates with the original
installation media so that original media and the updates are installed at the same time
The next section in this chapter describes how to set up a Slipstream installation
SQL Server 2008 SP1 also provides the capability to uninstall SQL Server 2008 cumulative
updates or service packs via the Programs and Features Control Panel (or the Add/Remove
Programs Control Panel in Windows XP or Windows Server 2003)
Before installing SP1, you should make sure to back up all user-created databases, as well
as the system databases master, model, msdb, and any replicated databases If you have
installed Analysis Services, back up the entire OLAP directory (as discussed earlier in this
chapter, in the “Installation Paths” section) and all its subdirectories
You also should make sure to close all open connections to the instance to which you are
applying SP1 (including any connections via the management tools; setup should prompt
you to close them) and make sure the various SQL Server services are started in the
Services Control Panel Also, be sure master and msdb each have 500KB free (or that they
are autogrow enabled)
When you’re ready, log on to the machine as an admin and start the downloaded SP1
executable After extracting the contents to a temporary folder on the C: drive, the SP1
setup launches, displaying the Welcome screen shown in Figure 8.23 As you can see from
this window, the SP1 Welcome screen runs the SP1 setup support rules to verify that the
SP1 install can be run
Click Next to display the License Agreement screen Click the check box to select the
license agreement and then click Next again to advance to the Select Features screen to
display and select the installed features to be updated (see Figure 8.24) The ensuing
Feature Selection window lists (again) the features to be updated, organized in tree
fashion, by SQL Server instance name You can uncheck the features or instances you do
not want to upgrade to SP1, except for shared features, which are required to be updated
Click Next to move onto the Check Files in Use screen (see Figure 8.25) This screen
iden-tifies any open or running files that the SP1 setup program needs access to during the
install If any files are listed, you have the option to shut down the services or
applica-tions associated with the files and run the check again to see whether the all items are
cleared from the list Note that it is not critical for the Files in Use list to be empty, but if
Trang 6FIGURE 8.23 SQL Server 2008 SP1 Welcome screen
FIGURE 8.24 SQL Server 2008 SP1 Feature Selection screen
Trang 7any files are listed, you need to reboot the system after running the SP1 setup to complete
the installation
Click Next again to proceed to the Ready to Update screen (see Figure 8.26), which
displays a summary of the instances and features that will be updated to SP1 Click Update
to start the installation and display the Update Progress screen When the SP1 installation
is complete, click Next to proceed to the Complete screen The Complete screen displays
the location of the SP1 summary log file (see Figure 8.27) The default location of the SP1
summary log file is C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\LOG
Installing SP1 from the Command Line
Like the SQL Server 2008 main install, SP1 can also be installed from the command line
with no user interaction This capability is useful if you need to install SP1 to a number of
servers and want to avoid having to go through all the SP1 Install Wizard screens each
time To run SP1 from the command line, you must first extract the setup files from the
SP1 download file, which is an executable archive file You can do this by running the
SQLServer2008SP1-KB968369-x64-ENU.exe file with the /x option from the command line
This launches the extractor, which prompts you for a location to extract the files to
Alternatively, you can specify a directory on a local drive to have it extract the setup files
to automatically:
SQLServer2008SP1-KB968369-x64-ENU.exe /x:C:\SP1
FIGURE 8.25 SQL Server 2008 SP1 Check Files in Use screen
Trang 8FIGURE 8.26 SQL Server 2008 SP1 Ready to Update screen
FIGURE 8.27 SQL Server 2008 SP1 Installation Complete screen
Trang 9After extracting the SP1 setup files to a folder, you can run the setup.exe program from
the command line The SP1 setup program supports options similar to the SQL Server
2008 installer command-line options (although significantly fewer options are available):
operation
and stop the SQL Server services if running in a non-Microsoft cluster environment
displayed to the console
interface
screens but without any user interaction
/X86—Specifies that Setup should install a 32-bit edition into WOW64 on an
x64-based system
For example, to install SP1 with no user interaction for all instances on a server, you
would run the following command:
setup.exe /quiet /allinstances
Slipstream Installations
With the release of SQL Server 2008 SP1, Microsoft provides the capability to create
Slipstream installations of SQL Server 2008 Slipstreaming is a method of integrating a
SQL Server 2008 update with the original installation media so that the original media
and update are installed at the same time This capability can be a huge timesaver over
having to manually run a service pack and possible cumulative update installations after
running a full SQL Server install, especially if you have to repeat the installation in
multi-ple environments
Slipstreaming is supported in the following scenarios:
Installing the original media and a service pack
Installing the original media, a service pack, and a cumulative update to the service
pack
Trang 10NOTE
Slipstreaming a cumulative update for SQL Server 2008 with the original media but
without a service pack is not supported because slipstreaming wasn’t supported until
SQL Server 2008 SP1 was released Also, a Slipstream installation cannot be
per-formed to update a SQL Server 2008 instance to SQL Server 2008 R2
If you are doing a single install of SQL Server 2008 and at the same time want to apply
SP1 and possibly a cumulative update as well, you can run the Slipstream installation by
performing the following steps:
1 If they are not installed already on the target machine, install the required
prerequi-sites for the SQL Server 2008 Installer (.NET Framework 3.5 SP1 and Windows
Installer 4.5) You can install them manually from the SQL Server install disk (the
installers are located in the Drive_Letter:\platform\redist\Windows Installer
folder) Alternatively, after you extract the service pack files, run the sqlsupport.msi
file from within the folder where the service pack files have been extracted For
example, if you extracted the Service pack to the C:\sql2k8xp1 folder on an X86
platform, this file would be found in the C:\SQL2K8SP1\x86\setup\1033 folder
NOTE
To confirm whether the setup support files are installed, search for the Microsoft SQL
Server 2008 Setup Support Files entry in the Programs and Features Control Panel (or
the Add or Remove Programs Control Panel in operating systems prior to Windows
Vista or Windows Server 2008)
NOTE
On the IA-64 platform, the NET Framework 3.5 is not supported The NET Framework
2.0 SP2 is required instead The NET Framework 2.0 SP2 is located in the
Drive_Letter:\ia64\redist\2.0\NetFx20SP2_ia64.exe folder on the source media
2 If not done already, download the Service Pack (PCU) package that matches your
system architecture and, if desired, the cumulative update (CU) package you want
to install
3 For each package you want to include in the Slipstream installation, extract the
contents to a folder on the local drive by running a command similar to the
follow-ing at the command prompt from within the folder where you downloaded the
package(s):
Name_of_the_PCU_or_CU_package.exe /x:Root_of_path_to_extract_to\<PCU | CU>