How to find all the SQL servers within a domain

  • Is there any sp or extended sp that I can run to get this? I rather not go through (if its even possible) AD utilities to find this info.

  • Use OSQL with -L switch...

    OSQL -L

    MohammedU
    Microsoft SQL Server MVP

  • Based on the help, osql -L lists all servers in a current domain, not only SQL Servers. Am I right?

    Many thanks in advance.

  • Only SQL server instances not ALL servers..

     

    MohammedU
    Microsoft SQL Server MVP

  • osql - L doesn't cross subnets so as long as your domain doesn't cross subnets and you haven't changed the default ports it should give you a pretty accurate list.

    Wes

  • have look at this tool.

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

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

  • Keep in mind that this uses 1434 to find them and lots of routers are configured to block this after Slammer (it used this as well).

    Finding instances can be hard. Might need the network guys to sniff for 1433 traffic.

  • I've not had to reconfigure but on the Options tab there is an option to change the default port. I would imagine that if a list of open ports was availlable from the network guys, you would be able to get the information needed although it may be a pain in the neck to do it this way.

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

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

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