Search

Wednesday, April 17, 2013

Find All SQL Servers in your Local Network

 

There are ways to accomplish this objective
  1. TSQL, which is very old way and doesn’t meets the requirement
  2. SQLCMD command line utility
  3. OSQL command line utility
  4. Microsoft Assessment and Planning (MAP) Toolkit, best tool
The easiest way to accomplish this is to use sqlcmd or osql built in utility with -L which will list down all the SQL Servers in your local network.

 
 
Note : osql -L and SQLCMD -L will only return for those instance, where SQL Browser services are running. For example, if you have stopped "SQL Server Browser" services, where SQL services are running that you will not get a sure results, as this only captures the instance names, which are publish via SQL Server Browser.
 

No comments:

Post a Comment