SharePoint Best Practices
Try SPDocKitContact Us
  • SharePoint Best Practices Library by SPDocKit
  • Configuration
    • App Configuration
      • App Services Configured
      • Apps Configured
    • Distributed Cache
      • Appfabric Patched
      • Cache Cluster State
      • Cache Running
      • SharePoint Distributed Cache Size 2013
      • Distributed Cache Collocation Compliance
    • Security
      • Farm Account is not Local Admin
      • Office Web Apps HTTPS
    • Solutions
      • Solution Assembly Deployment Valid
    • Servers
      • Expired Certificates
      • Loopback Disabled
      • Minrole Compliance
  • Databases
    • ModelDB
      • ModelDB Files Autogrowth
      • ModelDB Files Initial Size
      • ModelDB Recovery Model
    • TempDB
      • TempDB Files
      • TempDB Files Configuration
      • TempDB Recovery Model
      • TempDB Response Times
      • TempDB Size
    • Content Database Autogrowth
    • Content Database Capacity
    • Database Files
    • Disk Allocation Size
    • Max Degree of Parallelism
    • SQL Alias
    • SQL Server Memory – SQL Server Memory Allocation Best Practices
  • Hardware Requirements
    • Free Disk Space
    • SharePoint 2013 Server and Hardware Requirements
  • Maintenance
    • Backup
      • Content Database Backups
      • Farm Backup Configured
      • Farm Backup History
    • Misc
      • Farm Accounts Used Interactively
      • PDF iFilter Installed
      • Upgrade Ready
  • Monitoring and Logging
    • Diagnostic Log Path
    • Enable Usage and Health Data Collection
    • SharePoint IIS Log Path
    • Restrict Trace Log Disk Space Usage
    • Search Index Path
    • ULS Active
    • Usage and Health Log Path
    • Verbose Logging Enabled
  • Service Applications
    • Search
      • Crawl Account Search Permission
      • Incremental Search Configuration
      • PDF Extension Added to Search Application
      • Search Content Sources
      • Search Running
    • UPA
      • My Site Configured
      • UPA Up and Running
    • Web Analytics
      • Event Collection Configured
      • Web Analytics Services Started
    • Application Proxies
    • Authentication Providers
    • Exchange Task Sync
    • Multiple Service Applications
    • Sandboxed Code Service
    • SharePoint 2013 Secure Store Service Configured
    • State Service
  • SharePoint Software Boundaries and Limits
    • SharePoint Software Boundaries and Limits Overview
    • Limits by Feature
      • Search Limits
        • Authoritative Pages
        • Content Sources
        • Crawl Components
        • Crawl Databases
        • Crawl Rules
        • Index Partitions
        • Managed Properties
        • Property Databases
        • Scope Rules Count per Search Service Application
        • Scope Rules Count per Search Scope
        • Search Topology Limits
        • Sharepoint Search Service Applications
        • Start Addresses
      • User Profile Limits
        • User Profile Count
      • Visio Services Limits
        • File Size of Visio Web Drawings – Max Web Drawing Size
        • Visio Services Cache Age
        • Visio Web Drawing Recalculation Time-out
      • Word Automation Services
        • Conversion Job Size
        • Conversion Start Frequency
    • Limits by Hierarchy
      • Content Database Limits
        • Content Database Size
        • Number of Content Databases
        • Site Collections per Content Database
      • Server Limits
        • Number of Application Pools
      • Site Collection Limits
        • Number of Site Collections
        • Site Collection Size
        • Web Site
      • Web Application Limits
        • Content Databases
        • Managed Paths
        • Number of Web Applications
        • Site Collections
  • Site Collection Health
    • Farm Features Duplicate IDs
    • Features Duplicate IDs
    • SharePoint Site Collection Upgrade – Upgrade SharePoint 2010 to 2013
    • Site Collections Duplicate IDs
    • Web Application Features Duplicate IDs
  • Updates
    • SharePoint
      • Build Revoked
      • Farm in Trial
      • Is SharePoint Up to Date
      • SharePoint 2013 Language Packs Up to Date
      • Office Web Apps Up to Date - Office Web App Servers
      • Product Supported
    • Servers
      • Sharepoint Server Upgrade Required
      • Windows Updates
      • Hotfixes per Server Role
        • Application Servers Hotfixes
        • DB Servers Hotfixes
        • Distributed Cache Servers Hotfixes
        • Failover Servers Hotfixes
        • Search Servers Hotfixes
        • WFE Servers Hotfixes
  • Web Applications
    • Caching
      • BLOB Caching Enabled
      • Object Cache User Accounts
      • Publishing Cache
    • AppPool User in Performance Log Group
    • Batch Compilation Disabled
    • Web Application in Debug Mode - Web.config Debugging How To
    • Web Application URL Check
    • Web Applications Without Sites
    • SharePoint Web.config Files Equality
Powered by GitBook
On this page
  • Issue description
  • Explanation
  • Solution
  • Additional information

Was this helpful?

  1. Updates
  2. Servers
  3. Hotfixes per Server Role

DB Servers Hotfixes

DB Servers Hotfixes best practices report by SPDocKit determines whether all SQL servers supporting the SharePoint farm are running on the same patch level.

PreviousApplication Servers HotfixesNextDistributed Cache Servers Hotfixes

Last updated 1 year ago

Was this helpful?

Issue description

A SharePoint farm may utilize one or more SQL servers in various configurations to store configuration, content, and service application databases. This check determines whether all SQL servers supporting the SharePoint farm are running on the same patch level.

Explanation

All components in a SharePoint environment should be on the same patch level in order to provide maximum compatibility, stability, and supportability. This also applies to SQL servers.

Solution

Check all SQL servers in the SharePoint environment. Make sure that all SQL servers are running on the same patch level and that they are running on the minimum required patch level to support the SharePoint version you are running. In addition, verify that all servers are running the same Windows Server hotfixes.

To verify installed Windows and SQL Server updates, start Control Panel, go to Programs > Programs and Features and click View installed updates.

You can use this script:

param(
    [ValidateSet("Disable","Quick","Detailed")]
    [string]$WindowsUpdateCheck="Quick")

function Get-SPServerList
{
    $spServerList=@()
    $serverList = Get-SPServer
    foreach ($server in $serverList)
    {
        if ($server.Role -ne [Microsoft.SharePoint.Administration.SPServerRole]::Invalid)
        {
            $spServerList += $server.Address
        }
    }
    return $spServerList
}

function Get-WinUpdateLastInstalledHotfixDate([string]$serverName)
{
    $result = Get-HotFix -ComputerName $serverName -ErrorAction SilentlyContinue | Measure-Object InstalledOn -Maximum
    if (![string]::IsNullOrEmpty($result)) { $result = $result.Maximum.ToString("yyyy-MM-dd hh:mm:ss") }
    return $result
}

function Get-WinUpdateLastCheckDate([string]$serverName)
{
    $result = Invoke-Command -ComputerName $serverName -ScriptBlock {Get-ItemProperty -Path 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateAuto UpdateResultsDetect' -Name LastSuccessTime -ErrorAction SilentlyContinue | select -ExpandProperty LastSuccessTime}
    return $result 
}

function Get-WinUpdateLastInstallDate([string]$serverName)
{
    $result = Invoke-Command -ComputerName $serverName -ScriptBlock {Get-ItemProperty -Path 'HKLM:SOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdateAuto UpdateResultsInstall' -Name LastSuccessTime -ErrorAction SilentlyContinue | select -ExpandProperty LastSuccessTime}
    return $result
}

function Get-AvailableWindowsUpdatesCount([string]$serverName)
{
    $numUpdates = Invoke-Command -ComputerName $serverName -ScriptBlock {$Searcher = New-Object -ComObject Microsoft.Update.Searcher; $results = $searcher.search("Type='software' AND IsInstalled = 0 AND IsHidden = 0"); $results.Updates.Count} -ErrorAction SilentlyContinue
    if ([string]::IsNullOrEmpty($numUpdates))
    {
        $numUpdates = -1
    }
    return $numUpdates
}

function Get-SPFarmVersion
{
    return (Get-SPFarm).BuildVersion.ToString()
}

# based on the script by Stefan Goßner
# for more information, please visit http://blogs.technet.com/b/stefan_gossner/archive/2015/04/20/powershell-script-to-display-version-info-for-sharepoint-product-and-language-packs.aspx
function Get-SPProductsBuild([string]$serverName)
{
    $farmVersion = (Get-SPFarm).BuildVersion.ToString()
    # Get SharePoint Products and language packs

    $programs = Invoke-Command -ComputerName $serverName -ScriptBlock {$regLoc = Get-ChildItem "HKLM:SoftwareMicrosoftWindowsCurrentVersionUninstall" ; $RegLoc | where-object { $_.PsPath -like "*Office*" } | foreach {Get-ItemProperty $_.PsPath}}

    $consoleForegroundColor = [console]::ForegroundColor
    $Programs | foreach {  
        $_ | Select  DisplayName, DisplayVersion | foreach { if ( $_.DisplayVersion.Trim() -ne $farmVersion ) { [console]::ForegroundColor="Red"} else {[console]::ForegroundColor=$consoleForegroundColor} $_ }; 
    }

    [console]::ForegroundColor = $consoleForegroundColor
}

function Check-WindowsUpdatesDetailed([string]$serverName)
{
    Write-Host "Available Windows Updates: " -NoNewLine
    $numWU = Get-AvailableWindowsUpdatesCount $serverName
    if ($numWU -gt 0)
    {
        $fc = "Yellow"
    }
    else
    {
        $fc = "Green"
    }
    if ($numWU -eq -1)
    {
        $fc = "Red"
        $numWU = "Failed to connect"
    }
    Write-Host $numWU -ForegroundColor $fc
}

function Check-WindowsUpdatesQuick([string]$serverName)
{
    $wuLastCheck = Get-WinUpdateLastCheckDate $serverName
    $wuLastInstall = Get-WinUpdateLastInstallDate $serverName
    $fcC = $fcI = [console]::ForegroundColor

    if ([string]::IsNullOrEmpty($wuLastCheck))
    {
        $wuLastCheck = "Unknown"
        $fcC = "Red"
    }

    if ([string]::IsNullOrEmpty($wuLastInstall))
    { 
        $wuLastInstall = Get-WinUpdateLastInstalledHotfixDate $serverName
        if ([string]::IsNullOrEmpty($wuLastInstall))
        {
            $fcI = "Red"
            $wuLastInstall = "Unknown"
        }
    }

    Write-Host "`t Last Windows Update check: " -NoNewLine
    Write-Host "$wuLastCheck" -ForegroundColor $fcC
    Write-Host "`t Last Windows Update installation: " -NoNewLine
    Write-Host "$wuLastInstall" -ForegroundColor $fcI

}

function Get-SPServerNeedingUpgrade
{
    $serverList = Get-SPServer | Where{ ($_.NeedsUpgrade -eq $TRUE) -and ($_.Role -ne [Microsoft.SharePoint.Administration.SPServerRole]::Invalid)}
    if ([string]::IsNullOrEmpty($serverList))
    {
        Write-Host "None." -ForegroundColor Green
    }
    else
    {
        $serverList | ft -a
    }
}

### Main

$spServerList = Get-SPServerList

Write-Host "SharePoint farm build $((Get-SPFarm).BuildVersion.ToString())" -ForegroundColor Yellow
Write-Host ""

switch ($WindowsUpdateCheck)
{
    "Disable"       { Write-Host "Skipping Windows Update check" -ForegroundColor Yellow }
    "Quick"         { Write-Host "Last Windows Update check and installation time will be retrieved." -ForegroundColor Yellow }
    "Detailed"      { Write-Host "Detailed Windows Update check will be performed. This may take a long time." -ForegroundColor Yellow }
}

foreach ($server in $spServerList)
{
    Write-Host "=================================================" -ForegroundColor Green
    Write-Host "Server: $server" -ForegroundColor Green
    Write-Host "=================================================" -ForegroundColor Green

    switch ($WindowsUpdateCheck)
    {
        "Disable"       {  }
        "Quick"         { Check-WindowsUpdatesQuick $server }
        "Detailed"      { Check-WindowsUpdatesQuick $server; Check-WindowsUpdatesDetailed $server }
    }

    Write-Host ""
    Write-Host "Installed binaries:"
    Get-SPProductsBuild $server

    Write-Host ""
}

Write-Host "Following SharePoint servers must be upgraded via PSCONFIG: " -ForegroundColor Yellow
Get-SPServerNeedingUpgrade

Additional information

Additional information can be found in the following TechNet articles:

Windows SharePoint Services 3.0 and SharePoint Server 2007: Determine hardware and software requirements (Office SharePoint Server)
SharePoint Foundation 2010 and SharePoint Server 2010: Hardware and software requirements (SharePoint Foundation 2010)
SharePoint Foundation 2013 and SharePoint Server 2013: Hardware and software requirements for SharePoint 2013
2KB
get-bpserverupdatestatus.zip
archive
Download this script
Download SPDocKit