This monitor checks the status of the database as reported by Microsoft Managed Instance.
This monitor checks the status of the database as reported by Azure SQL DB Managed Instance. This is done by running a query against the master database of the Managed Instance and returning the state of the database. If you receive an alert from this monitor, an action is required in order to bring the database back to an operational state.
An unhealthy state indicates that the Managed Instance database is currently unavailable. All states except the ONLINE state will cause an unhealthy state. The possible states are detailed below:
Managed Instance Database State | Description | Health State |
ONLINE | Database is available for access. The primary Filegroup is online, although the undo phase of recovery may not have been completed. | Healthy |
OFFLINE | Database is unavailable. A database becomes offline by explicit user action and remains offline until additional user action is taken. For example, the database may be taken offline in order to move a file to a new disk. The database is then brought back online after the move has been completed. | Critical |
RECOVERY PENDING | Managed Instance has encountered a resource-related error during recovery. The database is not damaged, but files may be missing or system resource limitations may be preventing it from starting. The database is unavailable. Additional action by the user is required to resolve the error and let the recovery process be completed. | Critical |
SUSPECT | At least the primary Filegroup is suspect and may be damaged. The database cannot be recovered during startup of Managed Instance. The database is unavailable. Additional action by the user is required to resolve the problem. | Critical |
EMERGENCY | User has changed the database and set the status to EMERGENCY. The database is in single-user mode and may be repaired or restored. The database is marked READ_ONLY, logging is disabled, and access is limited to members of the sysadmin fixed server role. EMERGENCY is primarily used for troubleshooting purposes. For example, a database marked as suspect can be set to the EMERGENCY state. This could permit the system administrator read-only access to the database. Only members of the sysadmin fixed server role can set a database to the EMERGENCY state. | Critical |
RESTORING | One or more files of the primary Filegroup are being restored, or one or more secondary files are being restored offline. The database is unavailable. | Critical |
RECOVERING | Database is being recovered. The recovering process is a transient state; the database will automatically become online if the recovery succeeds. If the recovery fails, the database will become suspect. The database is unavailable. | Warning |
To find the exact state that was reported for the database, examine the context of the state change or alert.
You can attempt to bring the database back online to resolve the issue.
See the detailed information at:
https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.database.status.aspx
Name | Description | Default Value |
Alert Priority | Defines Alert Priority. | Normal |
Alert Severity | Defines Alert Severity. | Error |
Enabled | Enables or disables the workflow. | Yes |
Generates Alerts | Defines whether the workflow generates an Alert. | Yes |
Interval (seconds) | The recurring interval of time in seconds in which to run the workflow. | 300 |
Synchronization Time | The synchronization time specified by using a 24-hour format. May be omitted. |
|
Timeout (seconds) | Specifies the time the workflow is allowed to run before being closed and marked as failed. | 200 |
Timeout for database connection (seconds) | The workflow will fail and register an event, if it cannot access the database during the specified period. | 15 |
Target | Microsoft.Azure.ManagedInstance.Database | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Azure.ManagedInstance.MonitorType.Database.DBStatus | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.Azure.ManagedInstance.Monitor.Database.DBStatus" Accessibility="Public" Enabled="true" Target="MngdInstD!Microsoft.Azure.ManagedInstance.Database" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.Azure.ManagedInstance.MonitorType.Database.DBStatus" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.Azure.ManagedInstance.Monitor.Database.DBStatus.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.Database"]/DatabaseName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Good" MonitorTypeStateID="Good" HealthState="Success"/>
<OperationalState ID="Bad" MonitorTypeStateID="Bad" HealthState="Error"/>
<OperationalState ID="NeitherGoodNorBad" MonitorTypeStateID="NeitherGoodNorBad" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/MachineName$</MachineName>
<InstanceName>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/InstanceName$</InstanceName>
<DatabaseName>$Target/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.Database"]/DatabaseName$</DatabaseName>
<ConnectionString>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/ConnectionString$</ConnectionString>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>