Sql Server Instances - run Best Practices Assessment

The request to run SQL best practices assessment.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}/runBestPracticesAssessment?api-version=2026-01-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the Azure resource group

sqlServerInstanceName
path True

string

Name of SQL Server Instance

subscriptionId
path True

string

The ID of the Azure subscription

api-version
query True

string

The API version to use for the request

Responses

Name Type Description
200 OK

SqlServerInstanceRunBestPracticesAssessmentResponse

OK

Other Status Codes

ErrorResponse

*** Error Responses: ***

Examples

Trigger best practices assessment run on sql server instance

Sample request

POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlServerInstances/testsqlserver/runBestPracticesAssessment?api-version=2026-01-01

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlServerInstances/testsqlserver/jobs/235e045f:2D5237:2D38eb:2Db8fa:2Df0f549d1d7d9BestPracticesAssessmentJobOnDemand",
  "instanceName": "MSSQLSERVER",
  "jobStatus": "InProgress",
  "jobException": null,
  "backgroundJob": {
    "state": "Enabled",
    "executionState": "Waiting",
    "startTime": "2024-02-22T00:04:06.88265-08:00",
    "endTime": "2024-03-15T02:04:06.88265-07:00",
    "lastExecutionTime": null,
    "lastExecutionStatus": null
  },
  "sequencerActions": [
    {
      "actionId": ":2Fsubscriptions:2Fa5082b19:2D8a6e:2D4bc5:2D8fdd:2D8ef39dfebc39:2FresourceGroups:2Falzahedi:2Drg:2Deasyup:2Fproviders:2FMicrosoft:2EAzureArcData:2FsqlServerInstances:2Farcee:2Ddev:2Faction:2FMicrosoft:2ESqlServer:2EManagement:2EBestPracticesAssessmentPlugin:2EActions:2Df0f549d1d7d9BestPracticesAssessmentJobOnDemand",
      "state": "NotStarted",
      "result": "NotCompleted"
    },
    {
      "actionId": "system.last",
      "state": "NotStarted",
      "result": "NotCompleted"
    },
    {
      "actionId": "system.first",
      "state": "NotStarted",
      "result": "NotCompleted"
    }
  ]
}

Definitions

Name Description
BackgroundJob

The background job details.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

executionState

The execution state of the background job.

jobStatus

The status of the job.

lastExecutionStatus

The last execution status of the background job.

result

The result of the sequencer action.

SequencerAction

The list of sequencer actions.

sequencerState

The state of the sequencer action.

SqlServerInstanceRunBestPracticesAssessmentResponse

The response object for the request to run SQL best practices assessment.

state

The state of the background job.

BackgroundJob

The background job details.

Name Type Description
endTime

string (date-time)

The end time of the background job.

executionState

executionState

The execution state of the background job.

lastExecutionStatus

lastExecutionStatus

The last execution status of the background job.

lastExecutionTime

string (date-time)

The last execution time of the background job.

startTime

string (date-time)

The start time of the background job.

state

state

The state of the background job.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

executionState

The execution state of the background job.

Value Description
Waiting
Running

jobStatus

The status of the job.

Value Description
NotStarted
InProgress
Succeeded
Failed

lastExecutionStatus

The last execution status of the background job.

Value Description
Succeeded
Completed
Failed
Faulted
Postponed
Rescheduled

result

The result of the sequencer action.

Value Description
NotCompleted
Succeeded
Failed
TimedOut
Skipped

SequencerAction

The list of sequencer actions.

Name Type Description
actionId

string

The unique identifier of the sequencer action.

result

result

The result of the sequencer action.

state

sequencerState

The state of the sequencer action.

sequencerState

The state of the sequencer action.

Value Description
NotStarted
WaitingPredecessors
ExecutingAction
CreatingSuccessors
Completed

SqlServerInstanceRunBestPracticesAssessmentResponse

The response object for the request to run SQL best practices assessment.

Name Type Description
backgroundJob

BackgroundJob

The background job details.

id

string

The unique identifier of the job.

instanceName

string

The name of the SQL Server instance.

jobException

string

The exception message if the job failed.

jobStatus

jobStatus

The status of the job.

sequencerActions

SequencerAction[]

The list of sequencer actions.

state

The state of the background job.

Value Description
Enabled
Disabled
Deleted
Completed
Faulted
Suspended