Building Microsoft SQL Server AlwaysOn Availability Groups – Part 3 – Installation

The Failover Cluster was created so now we can continue with installation of the Microsoft SQL Server.

Create domain accounts for each service

  • Best practice is to have separate account for each service.
    • PowerShell
# Only for TESTING - Not secure because all accounts will have same password.
# Copyright (c) Rudolf Vesely

$users = Import-Csv -Path 'New user in AD.csv'

foreach ($user in $users.UserName)
'Creating user: {0}' -f $user

# Skip -Path to save in default CN=Users.
New-ADUser -Name $user `
-SamAccountName $user -UserPrincipalName ('{0}' -f $user) `
-AccountPassword (ConvertTo-SecureString -String 'Your Unsecure Password' -AsPlainText -Force)  `
-CannotChangePassword:$true -PasswordNeverExpires:$true `
-Path 'CN=Users,DC=ad,DC=contoso,DC=com' `
-PassThru | Enable-ADAccount

# Example of the CSV:
rebeca #>

Install .NET Framework 3.5 SP1

  • Install .NET 3.5 from the installation media (offline installation) without the need of downloading it from the Microsoft.
  • Command Prompt
dism.exe /Online /Enable-Feature /FeatureName:NetFX3 /All /Source:D:\Sources\sxs /LimitAccess
  • Do not forget to install .NET 3.5 security updates.

Install standalone SQL Server on every node in the cluster

  • Install Microsoft SQL Server on all nodes of you cluster.
  • The processor type should be discovered properly.
  • You need to install stand-alone SQL Server (not the Failover Cluster installation).
  • Choose features that you wish to install.
  • Set the drive letter and the installation directory. It is a good practice to use different volume then C volume. If for any reason the D volume become full then the volume with operating system and with paging file (C or another volume) will not be affected.
  • In the production environment it is recommended to use a named instance.
      • SCVMM0
  • Do not forget to change the drive letter and the directory if you need it.
  • Service Accounts
      • serdb1scvmm0a
      • serdb1scvmm0d
  • Set Startup Type of the services. In a lot of cases you will need to set SQL Server Agent to Automatic startup.
  • Collation – I will user the DB for the System Center products so I will leave it on the default SQL_Latin1_General_CP1_CI_AS.
  • If you can then set only the Windows authentication for the Authentication Mode.
  • Specify SQL Server administrators group
      • dbadmins0
  • Specify the Data Directories
      • Data root directory: D:\Program Files\Microsoft SQL Server\
      • User database directory: D:\Users\SCVMM0\Data
      • User database log directory: D:\Users\SCVMM0\Data
      • Temp DB directory: F:\Temp\Database\SCVMM0\Data
      • Temp DB log directory: G:\Temp\Log\SCVMM0\Data
      • Backup directory: E:\Backup\SCVMM0\Data
  • Enable FILESTREAM if your applications are able to use it.
  • Install

Leave a Reply

Your email address will not be published. Required fields are marked *

Active Directory Advanced function AlwaysOn Availability Groups AlwaysOn Failover Cluster Instances Building Cloud Cloud Cluster Cmdlet Database Deployment Design DFS Domain Controller DSC Fabric Failover Clustering File Server Group Policy Hardware Profile Host Hyper-V Installation Library Library Asset Library Server Network Operations Manager Orchestrator PowerShell PowerShell User Group PowerShell Workflow Security Service Manager SQL Server Storage System Center Template Time Time Synchronization Tips Virtual Machine Virtual Machine Manager VM Network VM Template Windows Server 2012 R2