Wednesday, July 20, 2011

SQL Server Express 2008 R2 Unattended Install

Simple steps to install SQL Server Express 2008 R2 in unattended mode.

1) Download SQL Server Express 2008 R2 from Microsoft web site.
For example, SQL Server Express 2008 R2 (ENU x86) can be downloaded from https://www.microsoft.com/betaexperience/pd/SQLEXPDB32/enus/
http://go.microsoft.com/fwlink/?LinkId=186782&clcid=0x409

(2008 R2 installation location table can be found at http://blogs.msdn.com/b/petersad/archive/2010/04/26/installing-sql-server-2008-r2-express.aspx )

There are two ways of installing SQL Express from here. One way is extract files from .EXE file and run setup.exe from the extracted directory.

2-1)

    a) Extract files from downloaded EXE file.
        The following command will extract files onto .\SQLEXPR folder silently.
       C> SQLEXPR32_x86_ENU.exe /Q /X:.\SQLEXPR

     b) Run SETUP.EXE with unattended setup arguments.
         The following command installs SQL Server Engine only in silent mode.
         Named instance (.\SQLExpress) will be created. Setup progress will be shown.

         C> SQLEXPR\SETUP.exe /ACTION=Install /INSTANCENAME=SQLExpress
/FEATURES=SQLENGINE /QS /IACCEPTSQLSERVERLICENSETERMS=true
/SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"
/BROWSERSVCSTARTUPTYPE=Disabled /ADDCURRENTUSERASSQLADMIN=true
/TCPENABLED=1 /HIDECONSOLE

2-2) The other way is to use all setup parameters directly in SQLEXPR32_x86_ENU.exe.

C> SQLEXPR32_x86_ENU.exe /ACTION=Install /INSTANCENAME=SQLExpress
/FEATURES=SQLENGINE /QS /IACCEPTSQLSERVERLICENSETERMS=true
/SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"
/BROWSERSVCSTARTUPTYPE=Disabled /ADDCURRENTUSERASSQLADMIN=true
/TCPENABLED=1 /HIDECONSOLE

For more information about all other setup command options, you can see How to: Install SQL Server 2008 R2 from the Command Prompt.

No comments:

Post a Comment