Need to check all servers on domain to see which ones have sql server installed

  • Need to check all servers on domain to see which ones have sql server installed. Does anyone have a script that can do this?

    I tried using OSQL -L on my local machine, but that just gave me a very short list, and I know there are much more than that.

    Thanks!

  • Tough request, as there's lots of variables here.

    Do you know if your SQL Servers are listening on the default port (1433)? Can you get a list of IPs to try and communicate with? Are there multiple instances on any of these servers? Do you have a userid that can login to each of the SQL Servers?

    I have a small script that runs a simple query to see if the databases are responding. It's driven from a file where I place all my SQL Servers, loop thru it and run an 'OSQL' command (similar to what you've done). Hopefully it helps.

    "server_up2.cmd" -- loops thru "serverlist.txt" and calls "doit.bat" for each server

    "doit.bat" -- runs the OSQL command and formats some output

    "serverlist.txt" -- file that contains a list of servers/IPs to query (not supplied, you'll have to create this)

    Make sure to remove the .txt extensions to execute.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • awesome, thanks very much! i'll give it a shot.

  • also look into SQLRecon;

    it's free and does a very thorough scan of all IP's on your network, looking for SQL in multiple ways.

    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!

Viewing 4 posts - 1 through 3 (of 3 total)

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