Find the List of the SQL Servers running on a network
I had requirement to find list of all the SQL Server installed on local network then I found few very useful commands. Here sharing with you all.
You can use sqlcmd, osql and isql with the -L option as shown below.
Using sqlcmd -L
Servers:
SQLServer1
SQLServer2\DBServer
SQLServer3\ReportServer
SQLServer4\SQLExpress
SQLServer5
Using osql -L
Servers:
SQLServer1
SQLServer2\DBServer
SQLServer3\ReportServer
SQLServer4\SQLExpress
SQLServer5
Using isql -L
Locally configured servers:
–None–
Announced network servers:
SQLServer1
SQLServer2
SQLServer3
SQLServer4
SQLServer5
Note: sqlcmd  and osql is able to find the instance names while isql only found the physical server name.
If you have any other way please share as comment.
Pingback: 100th Blog Post – Passage to 100th Post | Varinder Sandhu