Script to find all SQL Servers on network

Many a times we are required to find SQL Server installations across local network. This blog provides a script to find all SQL Servers on network using SQLCMD. It’s a very simple script and is given below.

Open up command prompt and type below command

>SQLCMD /?

This will list down all SQLCMD options as shown in below image.

1_script to find all sql servers on network

   

The highlighted option –L can be used to lists network servers. Let’s execute the same.

2_script to find all sql servers on network

Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

   

Leave a Reply

Your email address will not be published.