Saturday, September 21, 2013

1 Unattended install SQL Server 2008R2

Here are some notes for unattended installation of SQL Server 2008R2.

  • OS: Windows Server 2008R2
  • SQL Server version:  SQL Server 2008R2 Enterprise Edison

 

Enable dotNet feature

image

Prepare Configuration file

  • Use the setup.exe to create the configuration file once and use the updated configuration file to install on other host.
  • The configuration file does not contain any password. The account password needs to be provided either through command line or interactively .
  • I use QUIET = False and QUIETSIMPLE= True because I still want to see the progress. If both set as false, the installation will stop after setup the support rules as below screenshot, which this will need human interaction.

image

UIMODE is new attribute in 2008R2. Default is NORMAL. It is not compatible with  QUIET  and QUIETSIMPLE. I tried to set UIMODE as AutoAdvance ( QUIET and QUIETSIMPLE are both False). The installation stop at the License key.  My Media is from MSDN; the license key has prepopulate. I have to comment the UIMODE and set QUIETSIMPLE to Tue to achieve the fully automation.

image

Below is my configuration file.

;SQLSERVER2008 Configuration File
[SQLSERVER2008]
 
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will reflect the instance ID of the SQL Server instance. 
 
INSTANCEID="SGC2SQL2K8R2"
 
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. 
 
ACTION="Install"
 
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components. 
 
FEATURES=SQLENGINE,REPLICATION,FULLTEXT,AS,RS,SNAC_SDK
 
; Displays the command line parameters usage 
 
HELP="False"
 
; Specifies that the detailed Setup log should be piped to the console. 
 
INDICATEPROGRESS="False"
 
; Setup will not display any user interface. 
 
QUIET="False"
 
; Setup will display progress only without any user interaction. 
 
QUIETSIMPLE="True"
 
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. 
 
X86="False"
 
; Detailed help for command line argument ENU has not been defined yet. 
 
ENU="True"
 
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI, and AutoAdvance for a simplied UI. 
 
; UIMODE="Normal"
 
; 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="False"
 
; Specify the root installation directory for native shared components. 
 
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
 
; Specify the root installation directory for the WOW64 shared components. 
 
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
 
; Specify the installation directory. 
 
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
 
; 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="False"
 
; 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="SGC2SQL2K8R2"
 
; Agent account name 
 
AGTSVCACCOUNT="stargate\sqlprodid"
 
; Auto-start service after installation.  
 
AGTSVCSTARTUPTYPE="Manual"
 
; Startup type for Integration Services. 
 
ISSVCSTARTUPTYPE="Automatic"
 
; Account for Integration Services: Domain\User or system account. 
 
ISSVCACCOUNT="NT AUTHORITY\NetworkService"
 
; The name of the account that the Analysis Services service runs under. 
 
ASSVCACCOUNT="stargate\sqlprodid"
 
; Controls the service startup type setting after the service has been created. 
 
ASSVCSTARTUPTYPE="Automatic"
 
; The collation to be used by Analysis Services. 
 
ASCOLLATION="Latin1_General_CI_AS"
 
; The location for the Analysis Services data files. 
 
ASDATADIR="C:\DISK\SGC2\MSAS\Data"
 
; The location for the Analysis Services log files. 
 
ASLOGDIR="C:\DISK\SGC2\MSAS\Log"
 
; The location for the Analysis Services backup files. 
 
ASBACKUPDIR="C:\DISK\SGC2\MSAS\Backup"
 
; The location for the Analysis Services temporary files. 
 
ASTEMPDIR="C:\DISK\SGC2\MSAS\Temp"
 
; The location for the Analysis Services configuration files. 
 
ASCONFIGDIR="C:\DISK\SGC2\MSAS\Config"
 
; Specifies whether or not the MSOLAP provider is allowed to run in process. 
 
ASPROVIDERMSOLAP="1"
 
; Specifies the list of administrator accounts that need to be provisioned. 
 
ASSYSADMINACCOUNTS="STARGATE\PO"
 
; A port number used to connect to the SharePoint Central Administration web application. 
 
FARMADMINPORT="0"
 
; Startup type for the SQL Server service. 
 
SQLSVCSTARTUPTYPE="Automatic"
 
; Level to enable FILESTREAM feature at (0, 1, 2 or 3). 
 
FILESTREAMLEVEL="0"
 
; Set to "1" to enable RANU for SQL Server Express. 
 
ENABLERANU="False"
 
; 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="stargate\sqlprodid"
 
; Windows account(s) to provision as SQL Server system administrators. 
 
SQLSYSADMINACCOUNTS="STARGATE\PO"
 
; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication. 
 
SECURITYMODE="SQL"
 
; The Database Engine root data directory. 
 
INSTALLSQLDATADIR="C:\DISK\SGC2\DB"
 
; Default directory for the Database Engine backup files. 
 
SQLBACKUPDIR="C:\DISK\SGC2\DB\Backup"
 
; Default directory for the Database Engine user databases. 
 
SQLUSERDBDIR="C:\DISK\SGC2\DB\DATA"
 
; Directory for Database Engine TempDB files. 
 
SQLTEMPDBDIR="C:\DISK\SGC2\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="1"
 
; Specify 0 to disable or 1 to enable the Named Pipes protocol. 
 
NPENABLED="0"
 
; Startup type for Browser Service. 
 
BROWSERSVCSTARTUPTYPE="Automatic"
 
; Specifies which account the report server NT service should execute under.  When omitted or when the value is empty string, the default built-in account for the current operating system.
; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
; The domain part of RSSVCACCOUNT is a maximum of 254 characters long. 
 
RSSVCACCOUNT="STARGATE\sqlprodid"
 
; Specifies how the startup mode of the report server NT service.  When 
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled 
 
RSSVCSTARTUPTYPE="Automatic"
 
; Specifies which mode report server is installed in.  
; Default value: “FilesOnly”  
 
RSINSTALLMODE="DefaultNativeMode"
 
; Add description of input argument FTSVCACCOUNT 
 
FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"

 

Here is the command line argument to run the installation.

D:\Setup.exe /SQLSVCPASSWORD="password" /ASSVCPASSWORD="password" /AGTSVCPASSWORD="password" /ISSVCPASSWORD="password" /RSSVCPASSWORD="password" /SAPWD="password" /ConfigurationFile=C:\Users\PO\ConfigurationFile.INI

 

Add the static port number

This change will need to bounce the SQL Server instance to be effective.

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.SGC1SQL2K8R2\MSSQLServer\SuperSocketNetLib\Tcp\IPAll" /v tcpport /d 8001

image

Add SPN for Kerberos Authentication

This setting does not require bounce to make it effective but client needs to reconnect to use the kerberos connection.

setspn -A MSSQLSvc/SGC2.stargate.com:8001 stargate\sqlprodid

image

image

You can find more detail here.

 

Reference

http://msdn.microsoft.com/en-us/library/ms144259.aspx

1 comments:

  1. Hello SQLPANDA,
    Thank you for the post. Is there any bug fixing to be made to this method?
    I'm planning to use it with PDQ Deploy.

    THank you.

    ReplyDelete

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates