Sunday, July 29, 2012

Slipstream SQL Server 2008 R2 Service Pack 2

One of the new features added to Microsoft SQL Server 2008 and R2 is the ability to slipstream a service pack into the installation. This streamlines the installation, and reduces human error. Now that SQL Server 2008 R2 SP2 is officially out, here's how to build a slipstreamed installation. I've updated the instructions from the MSDN SQL 2008 R2 SP1 blog article to reflect SP2 filenames.

1. Download SQL Server 2008 R2 SP2 here. Note that you need to download all three architectures (IA64, x64, x86) even if you never plan on using them.

  • SQLServer2008R2SP2-KB2630458-IA64-ENU.exe
  • SQLServer2008R2SP2-KB2630458-x64-ENU.exe
  • SQLServer2008R2SP2-KB2630458-x86-ENU.exe

2. Copy your original SQL Server 2008 R2 media to a folder (e.g. SQL2008R2_SP2), I used the E drive so my path was E:\SQL2008R2_SP2.

3. You now need to extract the packages, using the path to where you copied the original source media.

SQLServer2008R2SP2-KB2630458-IA64-ENU.exe /x:e:\SQL2008R2_SP2\SP
SQLServer2008R2SP2-KB2630458-x64-ENU.exe /x:e:\SQL2008R2_SP2\SP
SQLServer2008R2SP2-KB2630458-x86-ENU.exe /x:e:\SQL2008R2_SP2\SP

4. Replace the original setup.exe with the SP2 version:

robocopy E:\SQL2008R2_SP2\SP E:\SQL2008R2_SP2 Setup.exe

5. Copy all of the files, excluding folders and the Microsoft.SQL.Chainer.PackageData.dll file to overwrite the non-SP2 files.

robocopy E:\SQL2008R2_SP2\SP\x86 E:\SQL2008R2_SP2\x86 /XF Microsoft.SQL.Chainer.PackageData.dll

robocopy E:\SQL2008R2_SP2\SP\x64 E:\SQL2008R2_SP2\x64 /XF Microsoft.SQL.Chainer.PackageData.dll 

robocopy E:\SQL2008R2_SP2\SP\ia64 E:\SQL2008R2_SP2\ia64 /XF Microsoft.SQL.Chainer.PackageData.dll 

6. To tell the SQL server installer where to find the service pack files you need to update all three DefaultSetup.ini files. They are located under E:\SQL2008R2_SP2\x86, x64 and ia64. Add the following line to the end of each file:

PCUSOURCE=".\SP"

7. Your SP2 slipstream media is now complete. Run Setup.exe like you normally would and enjoy an integrated installation of SQL Server 2008 R2 with SP2.

Update: You may get an installation error if installing on a 64-bit server. You may need to rename the sqlncli.msi file in \SP\1033_ENU_LP\x64\setup\x64 to sqlncli_amd64.msi.

9 comments:

  1. Use robocopy /S this will also update the subfolders.

    ReplyDelete
  2. In addition to steps described above, I needed to rename .\SP\1033_enu_lp\x86\setup\x86\sqlncl.msi to sqlncl2008r2sp2.msi. Probably also needed for x64 and IA64 folders.

    ReplyDelete
  3. Just test this for x64 and did not need to rename the above file name.

    ReplyDelete
  4. These instructions were perfect! Was able to create a slipstreamed SQL server 2008 R2 with SP2 installation media for my Windows 8 machine. Thank you for posting this!

    ReplyDelete
  5. I cannot find DefaultSetup.ini as instructed in step 6. can some one help me?

    ReplyDelete
  6. I tried this, but cannot find defaultSetup.ini files as suggested in step 6. Can anyone help me

    ReplyDelete
    Replies
    1. If you don't have a DefaultSetup.INI you should create one and make it like this:

      ;SQLSERVER2008 R2 Configuration File

      [SQLSERVER2008]

      PCUSOURCE=".\SP"

      and put it in the folders
      E:\SQL2008R2_SP2\SP\x86
      E:\SQL2008R2_SP2\SP\x64
      E:\SQL2008R2_SP2\SP\ia64

      Delete
  7. Worked perfectly for me.
    I installed on a 64 bit server and didn't need your update about renaming the file.

    ReplyDelete
  8. Thanks Derek for the clear instructions on this. Wish MSFT would make this process easier on all of us.

    ReplyDelete