Forma rápida de crear un instalador de SQL Server 2008 R2 con SP1 integrado (Slipstream)

For English version visit this link Quick way to create a SQL Server 2008 R2 installer with integrated SP1 (Slipstream)
 
Con la funcionalidad Slipstream podemos integrar los Service Pack o Cumulative Updates al instalador de SQL Server, con esto ahorramos mucho tiempo, sobre todo cuando hay que hacer múltiples instalaciones.
 
La guía que he creado es una modificación de How to slipstream SQL Server 2008 R2 and a SQL Server 2008 R2 Service Pack 1 (SP1), a la que añado un fichero .bat que nos ahorra mucho tiempo.
 
Esta guía es para la versión en Inglés de SQL Server 2008 R2.
 
Estos son los pasos a seguir:
 
1. Copiar los archivos de instalación de SQL Server 2008 R2 a C:\SQLServer2008R2_SP1
 
2. Descargar Microsoft® SQL Server® 2008 R2 Service Pack 1, es necesario descargar todas las arquitecturas y copiarlas a C:\
  • SQLServer2008R2SP1-KB2528583-IA64-ENU.exe
  • SQLServer2008R2SP1-KB2528583-x64-ENU.exe
  • SQLServer2008R2SP1-KB2528583-x86-ENU.exe
3. Crear un fichero .bat con el siguiente contenido y copiarlo a C:\ 
@ECHO OFF

::File Verification
IF NOT EXIST "C:\SQLServer2008R2_SP1\" GOTO ERROR
IF NOT EXIST "C:\SQLServer2008R2SP1-KB2528583-x86-ENU.exe" GOTO ERROR
IF NOT EXIST "C:\SQLServer2008R2SP1-KB2528583-x64-ENU.exe" GOTO ERROR
IF NOT EXIST "C:\SQLServer2008R2SP1-KB2528583-IA64-ENU.exe" GOTO ERROR

::Extract each of the SQL Server 2008 R2 SP1 packages to C:\SQLServer2008R2_SP1\SP
ECHO Extracting SP files to C:\SQLServer2008R2_SP1\SP...
start /wait C:\SQLServer2008R2SP1-KB2528583-x86-ENU.exe /x:C:\SQLServer2008R2_SP1\SP
ECHO Extract of SQLServer2008R2SP1-KB2528583-x86-ENU.exe Completed
start /wait C:\SQLServer2008R2SP1-KB2528583-x64-ENU.exe /x:C:\SQLServer2008R2_SP1\SP
ECHO Extract of SQLServer2008R2SP1-KB2528583-x64-ENU.exe Completed
start /wait C:\SQLServer2008R2SP1-KB2528583-IA64-ENU.exe /x:C:\SQLServer2008R2_SP1\SP
ECHO Extract of SQLServer2008R2SP1-KB2528583-IA64-ENU.exe Completed
ECHO.

::Copy Setup.exe from the SP extracted location to the original source media location
ECHO Copying Setup.exe to C:\SQLServer2008R2_SP1
start /wait robocopy C:\SQLServer2008R2_SP1\SP C:\SQLServer2008R2_SP1 Setup.exe
ECHO Setup.exe copied
ECHO.

::Copy all files, not the folders, except the Microsoft.SQL.Chainer.PackageData.dll, in C:\SQLServer2008R2_SP1\SP\<architecture> to C:\SQLServer2008R2_SP1\<architecture> to update the original files
ECHO Copying files to C:\SQLServer2008R2_SP1\
start /wait robocopy C:\SQLServer2008R2_SP1\SP\x86 C:\SQLServer2008R2_SP1\x86 /XF Microsoft.SQL.Chainer.PackageData.dll
ECHO Files from C:\SQLServer2008R2_SP1\SP\x86 copied
start /wait robocopy C:\SQLServer2008R2_SP1\SP\x64 C:\SQLServer2008R2_SP1\x64 /XF Microsoft.SQL.Chainer.PackageData.dll
ECHO Files from C:\SQLServer2008R2_SP1\SP\x64 copied
start /wait robocopy C:\SQLServer2008R2_SP1\SP\ia64 C:\SQLServer2008R2_SP1\ia64 /XF Microsoft.SQL.Chainer.PackageData.dll
ECHO Files from C:\SQLServer2008R2_SP1\SP\ia64 copied
ECHO.

::Create or modify DefaultSetup.ini
IF NOT EXIST "C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini" GOTO CREATEINI
ECHO Modifying DefaultSetup.ini
TYPE C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini > C:\SQLServer2008R2_SP1\x86\Temp_DefaultSetup.ini
ECHO PCUSOURCE=".\SP" >> C:\SQLServer2008R2_SP1\x86\Temp_DefaultSetup.ini
DEL C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini
REN C:\SQLServer2008R2_SP1\x86\Temp_DefaultSetup.ini DefaultSetup.ini
ECHO.
GOTO COPYINI
:CREATEINI
ECHO Creating or modifying DefaultSetup.ini
ECHO ;SQLSERVER2008 R2 Configuration File > C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini
ECHO [SQLSERVER2008] >> C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini
ECHO PCUSOURCE=".\SP" >> C:\SQLServer2008R2_SP1\x86\DefaultSetup.ini
ECHO.
:COPYINI

::Copy DefaultSetup.ini from x86 to x64 and ia64 folders
ECHO Copying DefaultSetup.ini from x86 to x64 and ia64 folders
start /wait robocopy C:\SQLServer2008R2_SP1\x86 C:\SQLServer2008R2_SP1\x64 DefaultSetup.ini
start /wait robocopy C:\SQLServer2008R2_SP1\x86 C:\SQLServer2008R2_SP1\ia64 DefaultSetup.ini
ECHO.

ECHO ==============================================================================
ECHO OPERATION COMPLETED
ECHO Use C:\SQLServer2008R2_SP1\Setup.exe to install SQL Server 2008 R2 + SP1
ECHO ==============================================================================
ECHO.
GOTO FIN

:ERROR
ECHO ==============================================================================
ECHO FILE VERIFICATION FAIL, PLEASE CHECK THE FOLLOWING:
ECHO THE DIRECTORY C:\SQLServer2008R2_SP1\ EXISTS
ECHO SQLServer2008R2SP1-KB2528583-x86-ENU.exe FILE IS LOCATED IN C:\
ECHO SQLServer2008R2SP1-KB2528583-x64-ENU.exe FILE IS LOCATED IN C:\
ECHO SQLServer2008R2SP1-KB2528583-IA64-ENU.exe FILE IS LOCATED IN C:\
ECHO ==============================================================================
ECHO.

:FIN
PAUSE
4. Ejecutar el fichero .bat como administrador
 
5. Utilizar C:\SQLServer2008R2_SP1\Setup.exe para realizar la instalación.
 
6. Se puede comprobar que la instalación contiene SlipStream en la pantalla Ready to Install:
 

About Fran Lens
SQL Server Analyst at Avanade Spain http://www.lensql.net

One Response to Forma rápida de crear un instalador de SQL Server 2008 R2 con SP1 integrado (Slipstream)

  1. Pingback: Cómo crear un instalador de SQL Server 2012 con CU1 integrado (Product Updates – Slipstream) « LenSQL

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

%d bloggers like this: