title: SQL Server heartbeat monitoring
body: <p>I wish to script the below scenario.</p>
  
  <p>I have list of 100 SQL Servers (there are few named instances as well). My goal is to </p>
  
  <ol>
  <li><p>Read each server from the table/textpad . </p></li>
  <li><p>Try to establish connection with Username and password provided. (It's a high privileged windows account, common for all servers.)</p>
  
  <p>NOTE : SQLCMD ,T-SQL or POWERSHELL would do.</p></li>
  <li><p>Check if  server is online. If yes,</p>
  
  <p>*) Skip it and go to next server or instance in the list.</p></li>
  <li><p>If no,</p>
  
  <p>*) need to throw a mail that server/instance is down.</p></li>
  </ol>