Getting Started with the SQL Server On-Demand Assessment

The SQL Server assessment allows you to diagnose potential issues with your SQL Server environment running on-premises, on Microsoft Azure Virtual Machines (VMs), or on Amazon Web Services (AWS) VMs. You can assess a single server, multiple servers, or failover cluster running SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017 or SQL Server 2019 instances, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019 failover cluster, or standalone server installations are supported.

The recommendations cover areas such as change control, monitoring, disaster recovery, service-level agreements, configuration items, and the proper function of the major components of the SQL environment.

This assessment is designed to provide you specific actionable guidance grouped in Focus Areas to mitigate risks to your SQL Servers and your organization.

The SQL Server Assessment focuses on several key pillars, including:

  • SQL Server configuration
  • Database design
  • Security
  • Performance
  • Always On
  • Cluster
  • Upgrade readiness
  • Error log analysis
  • Operational Excellence

Running the SQL Server Assessment

Prerequisites

To take full advantage of the On-Demand Assessments available through Services Hub, you must:

  1. Have linked an active Azure subscription to Services Hub and added the SQL Server Assessment. For more information please see: Getting Started with On-Demand Assessments or watch the how to link video.
  2. Install the Microsoft Monitoring Agent and choose the appropriate agent setup on a supported Windows Server machine. You can also watch the video guide on how to install the agent or how to configure the gateway.
  3. A domain account (User or Managed Service Account) with the following rights:
  • Member of the local Administrators group on all servers in the environment
  • SysAdmin role on all Microsoft SQL Servers in the environment.
  1. Review the Pre-Requisites document for the SQL Server Assessment. This document explains the detailed technical documentation of the SQL Server Assessment and the server preparation needed to run the assessment. It also documents the different types of data collected by the assessment.

Note: On average, it takes an hour to initially configure your environment to run an On-Demand Assessment. After you run an assessment, you can review the data in Azure Log Analytics. This will provide you with a prioritized list of recommendations, categorized across six focus areas. This allows you and your team to quickly understand risk levels, the health of your environments, act to decrease risk, and improve your overall IT health.

Setup the SQL Server Assessment - Watch Video Guide

Note: You will only be able to successfully setup the assessment once you have linked your Azure Subscription to Services Hub and added the SQL Server Assessment from Health > Assessments in Services Hub.

  1. On the data collection machine create the following folder: C:\LogAnalytics\SQLServer (or any other folder as you may please).

  2. If you are using a User Domain Account Open regular PowerShell (not ISE) in Administrator mode and run the below cmdlet:

    Add-SQLAssessmentTask -SQLServerName <YourServerName> –WorkingDirectory <Directory>

    where YourServerName is the fully qualified domain name (FQDN) or the NetBIOS name of single server or failover cluster running SQL Server environment.

If more than one environment is assessed, “;” is used between the environments. For failover cluster, check failover cluster virtual network name. Directory is the path to an existing directory used to store the files created while collecting and analyzing the data from the environment(s). Provide the required user account credentials that satisfy the requirements mentioned in this article earlier.

  1. If you are using a Group Managed Service Account Open regular PowerShell (not ISE) in Administrator mode and run the below cmdlet:

    Add-SQLAssessmentTask -SQLServerName <YourServerName> –WorkingDirectory <Directory> -RunWithManagedServiceAccount $True

    where YourServerName is the fully qualified domain name (FQDN) or the NetBIOS name of single server or failover cluster running SQL Server environment. When prompted for password just press enter, as you are using a gMSA you don't need to provide a password as it is handled by the system

If more than one environment is assessed, “;” is used between the environments. For failover cluster, check failover cluster virtual network name. Directory is the path to an existing directory used to store the files created while collecting and analyzing the data from the environment(s). Provide the required user account credentials that satisfy the requirements mentioned in this article earlier.

  1. Data collection is triggered by the scheduled task named SQLAssessment within an hour of running the previous script and then every 7 days. The task can be modified to run on a different date/time or even forced to run immediately from the task scheduler library > Microsoft > Operations Management Suite > AOI*** > Assessments > SQLAssessment.
  2. During collection and analysis, data is temporarily stored under the Working Directory folder that was configured during setup.
  3. After a few hours, your assessment results will be available on your Log Analytics and Services Hub Dashboard. You can navigate to see the results by going into Services Hub > Health > Assessments and then clicking on View all recommendations against the active assessment.
  4. If you wish to get a Microsoft Accredited Engineer to go over the issues about your SQL Server environment with you, you can contact your Microsoft Representative and ask them about the Remote or Onsite PFE Led Delivery.
Contract Remote Engineer Onsite Engineer
Premier SQL Remote Datasheet SQL Onsite Datasheet
Unified SQL Remote Datasheet SQL Onsite Datasheet

For general feedback on the Resource Center or content, please submit your response to UserVoice. For specific requests and content updates regarding the Services Hub, contact our Support Team to submit a case.