Installing SQL Server 2012

This is a continuation of the previous blog entry about configuring Windows Server 2012.

*** Installing SQL Server 2012 with full GUI***

SQL Server 2012 cannot easily be installed on Windows Server 2012. SQL Server 2012 requires .NET Framework 3.5 and the full GUI. Let's assume that the drive letter for the Windows Server 2012 DVD is D:.

add-windowsfeature net-framework-core -source d:\sources\sxs
This installs .NET Framework 3.5 needed by SQL Server 2012. If your server has Internet access you don't need the -source switch.

add-windowsfeature server-gui-shell
This installs the GUI necessary for SQL Server 2012.

Now we can install SQL Server 2012 using setup.exe on the SQL Server 2012 DVD.


*** Installing SQL Server 2012 on Server Core ***

SQL Server 2012 setup.exe requires WoW64 for some reason, or at least it complains about a missing 32 bit DLL. It will only tell us if we start it using the start command. It does not output to the command line or draw a window otherwise.

$source = “d:\sources\sxs”
Stores a path to the second image represented by install.wim in $source. Use $source as argument for the -source parameter in the commands below. Add the -source $source parameter if your server is connected to the Internet and you want to make sure that it downloads features from the Windows DVD and not Windows Update somewhere on the net. (Windows Server 2012)

Note that this was apparently too simple and for Windows Server 2012 R2, you need to do this instead:

get-windowsimage -imagepath d:\sources\install.wim
This is the first step in ensuring that Windows actually installs Windows features from the DVD rather than downloading them via the slowest possible network it has access to (i.e. the Internet). Make a note of the Index of the distribution of Windows you are using.

$source = “wim:d:\sources\install.wim:2”
Stores a path to the second image represented by install.wim in $source. Use $source as argument for the -source parameter in the commands below. Add the -source $source parameter if your server is connected to the Internet and you want to make sure that it downloads features from the Windows DVD and not Windows Update somewhere on the net. (Windows Server 2012 R2)

add-windowsfeature net-framework-core -source $source
This installs .NET Framework 3.5 needed by SQL Server 2012. If your server has Internet access you don't need the -source switch.

add-windowsfeature wow64-support
This will install WoW64.

With WoW64 installed, setup.exe runs and informs us that it is not supported on Server Core but will run in Full Quiet mode (/Q switch) or Quiet Simple mode (/QS switch).

This Microsoft article describes how to install SQL Server 2012 from the command line.

I tried it out.

We need the following parameters (I think):

  • /qs or /q for Quiet Simple or Full Quiet mode
  • /action=install
  • /features=sqlengine
  • /instancename=mssqlserver
  • /agtsvcaccount="nt service\sqlserveragent"
  • /sqlsvcaccount="nt service\mssqlserver"
  • /sqlsysadminaccounts=domain\someuser
  • /iacceptsqlserverlicenseterms

There are also parameters /agtsvcpassword and /sqlsvcpassword if needed. The accounts of the type "nt service\servicename" are "virtual accounts" that don't have passwords and essentially are supposed to act as service accounts locally and computer accounts when connecting to other computers in a domain. Obviously this never works.

setup.exe /qs /action=install /features=sqlengine /instancename=mssqlserver /agtsvcaccount="nt service\sqlserveragent" /sqlsvcaccount="nt service\mssqlserver" /sqlsysadminaccounts=ludwig\superman /iacceptsqlserverlicenseterms
This finally installs SQL Server 2012.

See screenshots of Windows Server 2012 (mostly in Server Core mode) and SQL Server 2012 here.




 © Andrew Brehm 2016