title: Azure SQL DB status monitor
body: <p>Is there a way how can I get alert (notification/email) when our Azure Database is down? Maybe something with datacenter, or DB is in the Deprecated status.</p>
  
  <p>So far, I found one query, that we might use</p>
  
  <pre><code>SELECT 'myDatabase status is:' AS Description, 
         ISNULL((SELECT state_desc 
                 FROM sys.databases WITH (NOLOCK) 
                 WHERE name ='DB Name'),'Not Found') AS [DBStatus]
  </code></pre>
  
  <p>Maybe I should create some background job. But I was thinking, if there is something built in that we can use.</p>