Overview of SQL Server Servicing Installation

You can upgrade any installed SQL Server 2008 R2 component with a SQL Server 2008 R2 servicing update. If the version level of an existing SQL Server 2008 R2 component is later than the update version level, the Setup program will exclude it from the update.

The following considerations apply when you install SQL Server 2008 R2 updates:

  • All features that belong to an instance of SQL Server must be updated at the same time. For example, when you update the Database Engine, you must also update Analysis Services and Reporting Services components if they are installed as part of the same instance of SQL Server. Shared features, such as Management Tools, Business Intelligence Development Studio, and SQL Server Integration Services, must always be updated to the most recent update. If a component or instance in the feature tree is not selected, the component or instance will not be updated.

  • By default, SQL Server 2008 R2 update log files are saved to %Program Files%\Microsoft SQL Server\100\Setup Bootstrap\LOG\.

  • You can slipstream an update with the original media to run the original media and the update at the same time. For more information, see Slipstream a SQL Server Update.

  • Before you apply a SQL Server 2008 R2 servicing update, we recommend that you consider backing up your data.

  • SQL Server updates are available through Microsoft Update. We recommend that you scan for updates regularly to keep your instance of SQL Server updated and secure.

  • The following considerations apply when updating a SQL Server 2008 R2 instance installed side by side with a SQL Server 2008 instance.

    • If you have SQL Server 2008 R2 instance installed side by side with a SQL Server 2008 instance, you will need to download and install the updates specific to each version.

    • When you install a SQL Server 2008 R2 instance side by side with a SQL Server 2008 instance, the shared components are upgraded to SQL Server 2008 R2. If you later decide to uninstall the SQL Server 2008 R2 instance, you will still need to download and install SQL Server 2008 R2 updates to the shared components.

    • SQL Server 2008 R2 Setup includes the installation of the SQL Server 2008 setup support files even if there is not an existing SQL Server 2008 instance on the same machine. It is therefore a good practice to download SQL Server 2008 updates to keep the SQL Server 2008 setup support files up to date.

For more information, see How to apply a SQL Server 2008 update to a failover cluster instance in the Microsoft Knowledge Base.

Disk Space Requirements

The recommended disk space requirements are approximately 2.5 times the size of the package to install, download, and extract the package.

After installing a service pack, you can remove the downloaded package. Any temporary files are removed automatically.

Installation Overview

This section discusses the SQL Server 2008 R2 installation for cumulative updates and service packs, including how to do the following:

  • Prepare for a SQL Server 2008 R2 update installation

  • Install SQL Server 2008 R2 updates

  • Restart services and applications

Prepare for a SQL Server 2008 R2 Update Installation

We strongly recommend that you do the following before you install SQL Server 2008 R2 updates:

  • Back up your SQL Server system databases — Before you install SQL Server 2008 R2 updates, back up the master, msdb, and model databases. Installing a SQL Server 2008 R2 update changes these databases, making them incompatible with earlier versions of SQL Server 2008 R2. Backups of these databases are required if you decide to reinstall SQL Server 2008 R2 without these updates.

    It is also prudent to back up your user databases.

Important

When you apply updates to instances of SQL Server that participate in a replication topology, you must back up your replicated databases together with your system databases before you apply the update.

  • Back up your Analysis Services databases, configuration file, and repository — Before you update an instance of Analysis Services, you should back up the following:

    • Analysis Services databases. By default, these are installed to C:\Program Files\Microsoft SQL Server\MSAS10_50\<InstanceID>\OLAP\Data\. For WOW installation, the default path is C:\ProgramFiles (x86)\Microsft SQL Server\MSAS10_50\<InstanceID>\OLAP\Data\.

    • Analysis Services configuration setting in the msmdsrv.ini configuration file. By default, this is located in the C:\Program Files\Microsoft SQL Server\MSAS10_50\<InstanceID>\OLAP\Config\ directory.

    • (Optional) The database that contains the Analysis Services repository. This step is required only if Analysis Services was configured to work with the Decision Support Objects (DSO) library.

Note

Failure to back up your Analysis Services databases, configuration file, and repository will prevent you from reverting an updated instance of Analysis Services to the earlier version.

  • Verify that the system databases have sufficient free space — If the autogrow option is not selected for the master and msdb system databases, these databases each must have at least 500 KB of free space. To verify that the databases have sufficient space, run the sp_spaceused system stored procedure on the master and msdb databases. If the unallocated space in either database is less than 500 KB, increase the size of the database. For more information, see "Expanding a Database" in SQL Server Books Online.

  • Stop Services and Applications — To avoid a possible restart of the system, stop all applications and services that make connections to the instances of SQL Server that are being upgraded, before installing SQL Server 2008 R2 updates. These include SQL Server Management Studio, Business Intelligence Development Studio.

Note

You cannot stop services in a failover cluster environment. For more information, see the failover cluster installation section later in this topic.

  • To eliminate the requirement to restart your computer after update installation, Setup will show a list of processes that are locking files. If the update Setup program must end a service during installation, it will restart the service after the installation finishes.

  • If Setup determines that files are locked during installation, you might have to restart your computer after the installation finishes. If it is required, Setup prompts you to restart your computer.

Install SQL Server 2008 R2 Updates

This section describes the installation process.

Important

   SQL Server 2008 R2 updates must be installed under an account that has administrative privileges on the computer where they will be installed.

Starting a SQL Server 2008 R2 Update

To install a SQL Server 2008 R2 update, run the self-extracting package file.

Cumulative update package (CU):SQLServer2008R2-KBxxxxxx-PPP.exe

Service pack package (PCU): SQLServer2008R2<SP> -KBxxxxxx-PPP.exe

PPP indicates the specific platform..

To apply updates to SQL Server 2008 R2 components that are part of a failover cluster, see the section for failover cluster installation. For more information about how to run an update installation in unattended mode, see How to: Install SQL Server 2008 R2 (Setup).

Slipstream a SQL Server 2008 R2 Update

Slipstreaming is the process of integrating a SQL Server 2008 R2 update with the original installation media so that the original media and the update are installed at the same time. When you run the original release version of SQL Server 2008 R2 Setup, the Setup program copies itself on the local computer, and then re-runs from the local copy. Therefore, if there is a later version of Setup on the computer, the Setup program runs the updated Setup.

Slipstreaming is supported in the following scenarios:

  • Original media and cumulative update

  • Original media and service pack

  • Original media, service pack, and cumulative update

Based on the number of computers on which you are planning to deploy the updates, there are two ways you can slipstream an update. For SQL Server Express, service packs are already included in the download packages. You can however slipstream a cumulative update with the SQL Server Express original media.

Option 1:

We recommend that you use this option if you are running the upgrade on a few computers.

  1. Install the following prerequisites that are required for SQL Server 2008 R2.

    • Microsoft Windows Installer 4.5

    • Microsoft .NET Framework 3.5 Service Pack 1

      Note

      On the IA-64 platform, the .NET Framework 3.5 is not supported, and the .NET Framework 2.0 SP2 is required. You must install the .NET Framework 2.0 SP2 from the source media because it is not available from the Microsoft Download Center. The .NET Framework 2.0 SP2 is located in the following folder on the source media:

      Drive_Letter:\ia64\redist\2.0\NetFx20SP2_ia64.exe

  2. Download the service package and cumulative update that you want to slipstream. Select the language or architecture package that matches your environment. Service packages must match both language and architecture; cumulative updates are language-neutral.

  3. Double-click the service pack to install the SQL Server 2008 R2 Setup support files. To confirm that the updated setup is installed, search for the "SQL Server 2008 Setup Support Files" entry by using the Add or Remove Programs item in Control Panel in operating systems that are earlier than Windows Vista. In Windows Vista or later versions of Windows, view the entry by using the Programs and Features item in Control Panel.

  4. For each package, extract the contents of the package by running the following script at the command prompt:

    <name of the PCU or CU package>.exe /x:<Root of path to extract to>\<PCU | CU>

    Note

    The name of the package is in the form:

    PCU: SQLServer2008R2<SP>-<KB Article>-<Architecture>-<Language>.exe

    CU: SQLServer2008R2-<KB Article>-<Architecture>.exe

    The architecture placeholder represents the different hardware platforms. For example, it can represent one of the following folders:

    x86

    x64

    IA64

    For example, run the following commands to extract the contents of the service pack (PCU):

    SQLServer2008R2<SP>- KB123456-IA64.exe /x:c:\MyUpdate\PCU

    SQLServer2008<SP>- KB123456-x64.exe /x:c:\MyUpdate\PCU

    SQLServer2008<SP>- KB123456-x86.exe /x:c:\MyUpdate\PCU

    If you want to include a CU based on the PCU, extract out the CU packages to c:\MyUpdate\CU

  5. Start the SQL Server 2008 R2 Setup program and specify the path for the service pack and cumulative update files by using the /PCUSource and /CUSource parameters. For example, here is a path based on the extracted location indicated in step 4:

    Setup.exe /PCUSource = c:\MyUpdate\PCU /CUSource= c:\MyUpdate\CU
    

    Note

    If you are slipstreaming SQL Server in WOW64, you need to do one of the following:

    • To skip the installation center, specify the /Action parameter and the /x86 parameter on the command line.

    • Or, on the Options page of the Installation Center, select x86.

Option 2:

We recommend that you use this option for running a patched setup on many computers or large deployments, or for when an administrator wants to make this patched setup available to users. We also recommend that you test fully before you make this option available to other users. This option is supported in the following scenarios:

  • Original media and cumulative update

  • Original media and service pack

  • Original media, service pack, and cumulative update

  1. Download the service pack and the optional cumulative update based on the service pack that you want to use to update the original media files. You must download the service pack and updates for all platforms (x86, x64, and IA-64) because the original media contains the files for each platform. For example, you must either download three packages for merging the original media and just the service pack or six packages for merging the original media, service pack, and cumulative update.

  2. For each package, extract the contents of the package by running the following script at the command prompt:

    <name of the PCU or CU package>.exe /x:<Root of path to extract to>\<PCU | CU>

    Note

    The name of the package is in the form:

    PCU: SQLServer2008R2<SP>-<KB Article>-<Architecture>-<Language>.exe

    CU: SQLServer2008R2<SP>-<KB Article>-<Architecture>.exe

    The architecture placeholder represents the different hardware platforms. For example, it can represent one of the following folders:

    x86

    x64

    IA64

    For example, run the following commands to extract the contents of the service pack (PCU) package:

    SQLServer2008R2<SP>- KB123456-IA64.exe /x:c:\SQLServer2008R2\PCU

    SQLServer2008R2<SP>- KB123456-x64.exe /x:c:\SQLServer2008R2\PCU

    SQLServer2008R2<SP>- KB123456-x86.exe /x:c:\SQLServer2008R2\PCU

    The previous command merges the three architectures into a single folder. If you want to include a CU based on the PCU, extract the cumulative update packages out to c:\ SQLServer2008R2\CU

  3. Copy the contents of the SQL Server 2008 R2 DVD to a local folder, for example SQLServer2008R2.

  4. Copy the Setup.exe file from the C:\ SQLServer2008R2\PCU\ folder to the root folder that contains the source media from the DVD.

    Note

    If you are using slipstream to integrate a cumulative update package also, use the files in the extracted cumulative update folder instead.

  5. To update the files in the original installation media, copy all files without the folders, except the Microsoft.SQL.Chainer.PackageData.dll, in c:\ SQLServer2008R2\PCU\<architecture> to C:\ SQLServer2008R2\<architecture>.

    Here is the robocopy command:

    • robocopy C:\SQLServer2008R2\PCU\x86 C:\SQLServer2008R2\x86 /XF Microsoft.SQL.Chainer.PackageData.dll

    • robocopy C:\ SQLServer2008R2\PCU\x64 C:\SQLServer2008R2\x64 /XF Microsoft.SQL.Chainer.PackageData.dll

    • robocopy C:\ SQLServer2008R2\PCU\ia64 C:\SQLServer2008R2\ia64 /XF Microsoft.SQL.Chainer.PackageData.dll

    Note

    If you are using slipstream to integrate a cumulative update package also, use the files in the extracted cumulative update folder instead

  6. Start the Setup.exe program that is located at C:\ SQLServer2008R2 and specify the values for /PCUSource and /CUSource parameters. For example, C:\ SQLServer2008R2\Setup.exe /PCUSource=c:\ SQLServer2008R2\PCU /CUSource= c:\ SQLServer2008R2\CU.

Note

If you place the folder on a share for user installs, set the /PCUSource and /CUSource parameters to a UNC path.

The Slipstream functionality will be enhanced in the future releases of SQL Server. Therefore the command-line parameters, /PCUSource and /CUSource, associated with the Slipstream functionality may change in a future release of SQL Server Setup.

Slipstream Express Core Service Pack with cumulative update:

  1. Install the following prerequisites that are required for SQL Server 2008 R2. Express

    • Microsoft Windows Installer 4.5

    • Microsoft .NET Framework 2.0 Service Pack 2

    Note

    .NET 2.0 SP2 is not publicly available so you need to install .NET 3.5 SP1 instead.

  2. Download the SQL Server Express core package and cumulative update that you want to slipstream. Select the language or architecture of SQL Server Express that matches your environment. The cumulative updates are language-neutral.

  3. Extract the contents of the cumulative update package by running the following script at the command prompt:

    <CU package>.exe /x:<Root of path to extract to>\<CU>

    Note

    The name of the package is in the form:

    CU: SQLServer2008R2-<KB Article>-<Architecture>.exe

    The architecture placeholder represents the different hardware platforms. For example, it can represent one of the following folders:

    x86

    x64

    For example, run the following commands to extract the contents of the cumulative update package:

    SQLServer2008R2-KB123456-IA64.exe /x:c:\MyUpdate\CU

    SQLServer2008R2-KB123456-x64.exe /x:c:\MyUpdate\CU

    SQLServer2008R2-KB123456-x86.exe /x:c:\MyUpdate\CU

  4. Start the SQL Server 2008 R2 Setup program and specify the path for the service pack and cumulative update files by using the /CUSource parameters.

    Note

    For SQL Server Express, only the /CUSource parameter is supported.

Updating a Prepared Image of SQL Server

You can apply an update to an unconfigured prepared instance of SQL Server without completing the configuration of the prepared instance. The three methods to applying an update to a prepared instance of SQL Server are explained below:

  • Combining an update with SysPrep to create a prepared instance of SQL Server using Slipstream:

    You can prepare an image and include the latest available update by combining the /Action=PrepareImage, /CUSource and /PCUSource parameters.

  • Updating a previously prepared instance of SQL Server

    Updates to a prepared instance can be applied to prior to configuration. The update package detects that the instance is in the prepared state and apply the patch to the prepared instance, without completing the configuration.

  • Updates to a prepared instance using Microsoft Update:

    You can apply updates to a prepared instance of SQL Server through Microsoft Update. The Microsoft Update package will detect that the instance is in the prepared state and apply the patch to the prepare instance without completing the configuration.

If you are updating a prepared image of SQL Server, you will need to specify the InstanceID parameter. For more information and sample syntax, see Installing Updates from the Command Prompt.

Updating a Completed Image of SQL Server

Updating a completed and configured instance of SQL Server follows the same processes as any other installed instances of SQL Server.

Applying a SQL Server 2008 R2 Update to a Failover Cluster Instance

For more information about how to install updates to a SQL Server 2008 R2 failover cluster, see How to apply a SQL Server 2008 update to a failover cluster instance in the Microsoft Knowledge Base.

Rebuilding a SQL Server 2008 R2 Failover Cluster Node

If you must rebuild a node in the failover cluster after updates were applied, follow these steps:

  1. Rebuild the node in the failover cluster. For more information about rebuilding a node, see "How to: Recover from Failover Cluster Failure in Scenario 1" in SQL Server Books Online.

  2. Run the original SQL Server 2008 R2 Setup program to install SQL Server 2008 R2 on the failover cluster node.

  3. Run SQL Server 2008 R2 updates Setup on the node that you have added.

Restart Services and Applications

When the Setup program is finished, it might prompt you to restart the computer. After the system restarts, or after the Setup program finishes without requesting a restart, use the Services node in Control Panel to restart the services that you stopped before you applied the SQL Server 2008 R2 updates. This includes services such as Distributed Transaction Coordinator and the Microsoft Search services, or instance-specific equivalents.

Restart the applications that you closed before you ran SQL Server 2008 R2 update Setup. You might also want to make another backup of the upgraded master, msdb, and model databases immediately after successful installation.

Uninstalling updates from SQL Server 2008 R2

You can uninstall SQL Server 2008 R2 cumulative updates or service packs from Programs and Features in Control Panel. Each cumulative update is listed separately. However, when a service pack is installed that is higher than the cumulative updates, the cumulative update entries are hidden and become available only if you uninstall the service pack.

To uninstall any service packs and updates, you must start with the latest update or service pack applied to the instance of SQL Server and work backward. In each of the following examples, SQL Server ends up with Cumulative Update 1 after uninstall has been completed for the other service packs or updates:

  • For an instance of SQL Server 2008 R2 with Cumulative Update 1 and SP1 installed, uninstall SP1.

  • For an instance of SQL Server 2008 R2 with Cumulative Update 1, SP1, and Cumulative Update 2 installed, uninstall Cumulative Update 2 first and then uninstall SP1.