Tuesday, January 25, 2011

Finding MS SQL servers that are listening

I learned a new trick today to find potentially listening MS SQL servers in a networked environment.  Currently, I have a process where I go through netstat results, gathered from the audited servers, looking for servers that have a MS SQL server listening.  However, a co-worker taught me a neat trick.  From a sql server, issue the following command from a command prompt:
osql -l

This will return a list of servers that are listening.  I know that you still have to check out the servers, but it is a good quick and dirty method of finding other SQL servers.  This has already proven helpful when the client is not the most forthcoming about how many SQL servers they have, or does not know all of the SQL servers on their network.

No comments:

Post a Comment