Unattended install for SQL Server 2008 R2


My current project involves lot of migration of servers from one data room to a new datacenter or local data room at new location for the customer. This involves installation of many SQL Servers. There exist many SQL Server 2000 database servers and we decided to install SQL Server 2008 R2 and run the SQL Server 2000 databases with the Compability Level option. Microsoft only support the latest 3 version with this option. This means that SQL Server 2008 R2 is the latest version we can use for support of SQL Server 2000. Windows Server 2008 R2 is used and Powershell 2.0.

You start by generating your installation options by running a standard install with all the options you want for your SQL Server. When you reach the “Ready To Install” a file called ConfigurationFile.ini with a path is generated with all your options set. Normally, you click install at this point, but just copy the filepath and press “Cancel”. This is shown in the screenshot below.

SQL2008_install20

The next step is to modify the ConfigurationFile.ini to be able to run the installation without any interaction. Put the following statements below the “ACTION=Install” statement:

IACCEPTSQLSERVERLICENSETERMS="True"
INDICATEPROGRESS="True"
QUIETSIMPLE="True"

You have to remove the UIMODE statement since this is not combinable with the QUIETSIMPLE statement. This should be enough to perform a unattended installation from the command-line:

D:\setup.exe /configurationfile="C:\Install\ConfigurationFile.ini"

In my case, the DVD has the drive letter D: and my installation scripts are located in C:\Install folder.

The next step is to create a powershell script with pre- and post-installation tasks (OS and DB) that you need to perform during the before and after installation. Jonathan Kehayias at sqlskills.com has a very good checklist post that can be used to complete your powershell script. In my current script I’m checking the ‘Allocation Unit Size‘ for the data, log and tempdb disks, in addition to configuring the ‘Maximum Server Memory‘ and initial user rights.

Advertisements

4 thoughts on “Unattended install for SQL Server 2008 R2

  1. Pingback: Unattended install for SQL Server 2014 CTP2 | Sveroa's Developer Blog

  2. Hi, I have some few things scripted and written some previous posts. But I can write a post when I’ve completed the Windows Server 2012 and SQL Server 2014 script…just started with this after New year. I will probably have the post ready during a week or so.

    But here is my install powershell script for my DEV-box:
    https://dl.dropboxusercontent.com/u/15658890/SQL/2008R2_intall_dev.ps1

    Change the [MyPassword] to your own sa password. The script assume I: for data disk, J: for log and T: for tempdb and require 64K allocation unit size for these disks. My complete install script for Windows Server 2012 will automate this task.

    See the following post for how to format with 64K allocation unit size:
    https://sveroadev.wordpress.com/2013/12/20/disk-allocation-unit-size-v2/

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