SQL Monitor 11

Annotations

The annotations API can be used to add annotations to the top graph (timeline) for SQL Server instances, for example to record the time of a deployment.

Add-Annotation

You can add an annotation with a command similar to this:

Add-Annotation -Target $instance -Description "Deployment" -UtcDate Get-Date

Parameters:

NameTypeMandatoryDescription
TargetInstanceYesThe SQLServer instance to target the annotation at
DescriptionstringNoA textual description; will form the title of the annotation unless Source is specified, where it will form an additional line of information
UtcDateDateTimeYesThe time in UTC to attach the annotation
UrlstringNoA URL to navigate the user to if the annotation is clicked
SourcestringNoThe source of the annotation, such as Error or SQL Update
DatabaseNamestringNoUnused for now
SpecificInfostringNoCustomises different types of annotations

Valid Sources:

NameDescription

Deployment

For annotating deployments to the SQL Server. Use SpecificInfo to specify what was deployed. 

ErrorFor annotating errors. Use SpecificInfo to specify error.

Permissions ChangeFor annotating permissions changing on a SQL Server.

Configuration ChangeFor annotating configuration changes. Use SpecificInfo to indicate what configuration was configured.

SQL UpdateFor annotating SQL Updates. Use SpecificInfo to provide the version number updated.

Get-Annotation

Get details about an annotation on a SQL Server instance at a given time.

$annotation = Get-Annotation -Target $instance -UtcDate $date

Remove-Annotation

Removes an annotation from a SQL Server instance at a given time.

Remove-Annotation -Target $instance -UtcDate $date

Update-Annotation

Updates an annotation on a SQL Server instance at a given time by overwriting the annotation with the newly provided details.

Takes the same arguments as Add-Annotation.


Didn't find what you were looking for?