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.

Usage:

  • Download the sqlserverconnectivity.zip 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

server_connectivity_1

Failure Report

server_connectivity_2


Posted

in

by

Comments

3 responses to “Script to Check SQL Server Connectivity”

  1. VidhyaSagar avatar
    VidhyaSagar

    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
    Ram

    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 to VidhyaSagar Cancel reply

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