Installing SQL Server 2016 on Windows Server 2016

Installing SQL Server 2016 on Windows Server 2016. It is not much different from previous versions of SQL Server or on previous version of Windows.

But SQL Management Studio needs to be installed separately now from standalone SQL Server Installer. The idea behind is you don’t need to have SQL Management Studio on all servers, as you can remotely access it from your machine or machine with SQL Management Studio installed.

SQL Server installation is almost same, so I will be using the Configuration file to do so.

There are two ways you can install the SQL Server, one using command line with configuration file or manually using GUI.

Keep in mind that SQL Server Management Tools are installed separate and are not part of I have no issues installing or not installing on the same server. It is up-to your requirements whether you want to install or not, But I will be covering in this series for sure.

Install SQL Server 2016 from command line

Run the following command to install it automatically using the Configuration File

You can save the following code in bat file and execute from there.

@echo off

FOR /F %%p IN (‘cd’) DO SET CurrentPath=%%p

Echo Installing SQL Server

“%CurrentPath%\Microsoft SQL Server 2016\setup.exe” /Configurationfile=”%CurrentPath%\SQLServer2016InstallationConfigFile.ini” /IAcceptSQLServerLicenseTerms

 Change your folder location to suit your setup.

Remember SQLServer2016InstallationConfigFile.ini file is the Configuration file saved with answers.

Here is the Template for Configuration file, just save it to a file and use happily.

;SQL Server 2016 Configuration File
[OPTIONS]

; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.

ACTION=”Install”

; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line.

SUPPRESSPRIVACYSTATEMENTNOTICE=”False”

; By specifying this parameter and accepting Microsoft R Open and Microsoft R Server terms, you acknowledge that you have read and understood the terms of use.

IACCEPTROPENLICENSETERMS=”True”

; Use the /ENU parameter to install the English version of SQL Server on your localized Windows operating system.

ENU=”True”

; Setup will not display any user interface.

QUIET=”False”

; Setup will display progress only, without any user interaction.

QUIETSIMPLE=”True”

; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
;UIMODE=”Normal”

; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.

UpdateEnabled=”False”

; If this parameter is provided, then this computer will use Microsoft Update to check for updates.

USEMICROSOFTUPDATE=”False”

; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install shared components.

FEATURES=SQLENGINE,FULLTEXT,RS,IS

; Specify the location where SQL Server Setup will obtain product updates. The valid values are “MU” to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services.

UpdateSource=”MU”

; Displays the command line parameters usage

HELP=”False”

; Specifies that the detailed Setup log should be piped to the console.

INDICATEPROGRESS=”False”

; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.

X86=”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=”MSSQLSERVER”

; Specify the root installation directory for shared components. This directory remains unchanged after shared components are already installed.

INSTALLSHAREDDIR=”C:\Program Files\Microsoft SQL Server”

; Specify the root installation directory for the WOW64 shared components. This directory remains unchanged after WOW64 shared components are already installed.

INSTALLSHAREDWOWDIR=”C:\Program Files (x86)\Microsoft SQL Server”

; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.

INSTANCEID=”MSSQLSERVER”

; Specifies which mode report server is installed in.
; Default value: “FilesOnly”

RSINSTALLMODE=”DefaultNativeMode”

; TelemetryUserNameConfigDescription

SQLTELSVCACCT=”NT Service\SQLTELEMETRY”

; TelemetryStartupConfigDescription

SQLTELSVCSTARTUPTYPE=”Automatic”

; TelemetryStartupConfigDescription

ISTELSVCSTARTUPTYPE=”Automatic”

; TelemetryUserNameConfigDescription

ISTELSVCACCT=”NT Service\SSISTELEMETRY130″

; Specify the installation directory.

INSTANCEDIR=”C:\Program Files\Microsoft SQL Server”

; Agent account name

AGTSVCACCOUNT=”HarmikBatth\svc_SQL_AGT_01″
AGTSVCPASSWORD=”sErverPassw0rd”

; Auto-start service after installation.

AGTSVCSTARTUPTYPE=”Automatic”

; Startup type for Integration Services.

ISSVCSTARTUPTYPE=”Automatic”

; Account for Integration Services: Domain\User or system account.

ISSVCACCOUNT=”NT Service\MsDtsServer130″

; CM brick TCP communication port

COMMFABRICPORT=”0″

; How matrix will use private networks

COMMFABRICNETWORKLEVEL=”0″

; How inter brick communication will be protected

COMMFABRICENCRYPTION=”0″

; TCP port used by the CM brick

MATRIXCMBRICKCOMMPORT=”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=”NT Service\MSSQLSERVER”

; Set to “True” to enable instant file initialization for SQL Server service. If enabled, Setup will grant Perform Volume Maintenance Task privilege to the Database Engine Service SID. This may lead to information disclosure as it could allow deleted content to be accessed by an unauthorized principal.

SQLSVCINSTANTFILEINIT=”False”

; Windows account(s) to provision as SQL Server system administrators.

SQLSYSADMINACCOUNTS=”HarmikBatth\SG_SCOM_Administrators”

; The default is Windows Authentication. Use “SQL” for Mixed Mode Authentication.

SECURITYMODE=”SQL”
SAPWD=”ServerPassw0rd”

; The number of Database Engine TempDB files.

SQLTEMPDBFILECOUNT=”4″

; Specifies the initial size of a Database Engine TempDB data file in MB.

SQLTEMPDBFILESIZE=”8″

; Specifies the automatic growth increment of each Database Engine TempDB data file in MB.

SQLTEMPDBFILEGROWTH=”64″

; Specifies the initial size of the Database Engine TempDB log file in MB.

SQLTEMPDBLOGFILESIZE=”8″

; Specifies the automatic growth increment of the Database Engine TempDB log file in MB.

SQLTEMPDBLOGFILEGROWTH=”64″

; The Database Engine root data directory.

INSTALLSQLDATADIR=”D:\SQL Data”

; Default directory for the Database Engine backup files.

SQLBACKUPDIR=”D:\SQL Data\Backup”

; Default directory for the Database Engine user databases.

SQLUSERDBDIR=”D:\SQL Data\Databases”

; Default directory for the Database Engine user database logs.

SQLUSERDBLOGDIR=”D:\SQL Data\Log”

; Directories for Database Engine TempDB files.

SQLTEMPDBDIR=”E:\SQL Data\Databases”

; Directory for the Database Engine TempDB log files.

SQLTEMPDBLOGDIR=”E:\SQL Data\Log”

; Provision current user as a Database Engine system administrator for %SQL_PRODUCT_SHORT_NAME% 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=”NT Service\ReportServer”

; 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”

; Add description of input argument FTSVCACCOUNT

FTSVCACCOUNT=”NT Service\MSSQLFDLauncher”

This is working configuration file, tested with SQL 2016 and Windows 2016.

Install SQL Server 2016 manually via GUI

Double click on Setup.exe in Installation media folder for SQL Server

Click on New SQL Server Installation 1_sql-server-installation-center
You may have noticed that you will need to install SQL Management studio as separate installation.

Enter the Product Key and Click Next

Check “I Accept the license terms” and click next. Read license terms before clicking I Accept.

2_sql-server-2016-setup

Click Next on Global Rules page

3_sql-server-setup

Click Next on Microsoft Update page

4_sql-server-setup

Skip Updates if required

Click Next on Install Rules

5_sql-server-setup
You might get warning on .Net Application security, this is due to computer cannot access the internet. This has nothing to worry about.
Click Next to Continue

6_sql-server-setup

Select the required components

Database Engine Services

Full-Text and Semantic Extractions for Search

Reporting Services – Native

Click Next to Continue

7_sql-server-setup

Leave the Instance name to Default and Click Next to Continue

8_sql-server-setup

Select the Domain account and change startup type to Automatic for all required Services.

9_sql-server-setup

Make sure the Collation is set to “SQL_Latin1_General_CP1_CI_AS” for most applications to work properly.

10_sql-server-setup

11_sql-server-setup

Click Next to Continue

On Database Engine configuration, Select Mixed mode.

Enter mixed mode password

Add SQL Administrators group to SQL Server administrators

12_sql-server-setup

Change Database directories if required to suit your needs

Click Next on Database Engine Customizations

On Reporting Services customization step, Click next to Continue

13_sql-server-setup

Click Next and Next to Install

You may want to save the Configuration file to automate your next installation.

14_sql-server-setup

Click OK and Restart your SQL Server.

Install SQL Server 2016 Management Studio

Actually Installing SQL Management studio is very easy, just download and click Install. Download the latest SQL 2016 Management Studio from here.

Double click on “SSMS-Setup-ENU.exe
Click Install to begin SQL Server 2016 Management Studio installation

sql2016-managementstudio-01

One prompted, click on Yes for UAC prompt to allow installation

sql2016-managementstudio-02

Once Installation is completed, Click Close.
sql2016-managementstudio-03

 

That’s it. This completes the installation for SQL Server 2016 and Management Studio as well.

 

Troubleshooting

For those having issues with SQL Server installation and come up with “KB2919355”, please download it from – https://www.microsoft.com/en-us/download/confirmation.aspx?id=42334

  1. These KB’s must be installed in the following order: clearcompressionflag.exe, KB2919355, KB2932046, KB2959977, KB2937592, KB2938439, and KB2934018.
  2. KB2919442 is a prerequisite for Windows Server 2012 R2 Update and should be installed before attempting to install KB2919355
  1. Update for Windows Server 2012 R2 (KB2919442)  – https://www.microsoft.com/en-au/download/details.aspx?id=42153

 

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