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

Leave a Reply

3 comments

  1. 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. 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

Leave a comment

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

*