Finding SQL Servers on your Network

  • I'm working in a new environment and would like to list the MSSQL servers available and their versions. Is there a "ping" equivalent for MSSQL servers?

  • you can use the osql utility to do this.  Type osql -L from the command line or:

    exec master..xp_cmdshell 'osql -L' from query analyzer and you will get a list of sql servers that are broadcasting on your network.  In order to find version numbers you will have to issue a select @@version on all of these servers.

     

  • SQLRecon is excellent for this:

    http://www.specialopssecurity.com/labs/sqlrecon/

     

    it finds all SQL Server instances by scanning all sorts of methods in order to give a comprehensive list. it's also free.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Another tool you can use is SQL Ping.

    http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=26

  • SQLRecon and SQLPing are both by Chip Andrews. SQLRecon is descended from SQLPing and SQLPing2. Therefore, SQLRecon is the preferred tool now.

    Also, the osql -L command works based on talking with the SQL Server Listener Service. If a SQL Server is not online, if it is configured to be hidden, or if udp/1434 is blocked anywhere along the way, the -L won't catch the SQL Server. SQLRecon checks services, registry entries, etc., to try and find SQL Server installs. As a result, the -L switch is probably the least effective of the methods given to locate SQL Servers on your network.

    K. Brian Kelley
    @kbriankelley

  • I'd just like to thank all those that repliend to my query, I now have a list of all the servers on my network. Really appreciate the help, thank you very much.

  • Didn't realise that SQLRecon was based on SQLPing!

    I guess in the job merry-go-round I missed that one.  Will check it out!

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply