Script to Check SQL Server Connectivity

Use this VB script to check SQL Server connectivity. You can add N number of SQL Server instances to verify its status.


  • Download the file and extract all the files to a folder
  • Make sure connectivity.vbs, serverlist.txt and model.xls files exists in the same folder
  • Open serverlist.txt file and add server name in each line.
  • Execute connectivity.vbs file, it will generate a new excel file with the status
  • In the excel created you can get the status in ServerStatus sheet and connectivity error details in Error sheet.

Success Report


Failure Report






3 responses to “Script to Check SQL Server Connectivity”

  1. VidhyaSagar avatar

    There is one bug with the connectivity vb script. I have used SQL Native client provider 10 version in connection string, if you don’t have that provider then the script will loop infinetly in the first servername. This has been found by Suresh. I have now fixed the connection string by using SQL OLEDB provider and below is the connection string used in that vb script

    Conn.Open “Provider=SQLOLEDB.1;Integrated Security=SSPI;Data Source=” & inlist(0) & “;”

    Thanks Suresh for pointing this out!!

  2. Ram avatar

    HI Vidyasagar,
    SQL SERVER CONNECTIVITY script was great,it would be nice if you can add other sqlserver services like ssrs,ssis,ssas,browser,Full text search

    1. VidhyaSagar avatar

      Sure will update with new script soon

Leave a Reply

Your email address will not be published. Required fields are marked *