locate all databases in different servers

  • Currently, there are databases that are resided on different servers. Some of them I know where they are, but some of them I have no idea (lack of documentation)

    Is there any way or tool to locate all the databases in different servers?

    Thanks

  • Are you looking for SQL Server DBs or any DBs, and by "servers" are you including non-database servers in your search, i.e... File servers?

    David

  • Hi David,

    I am looking for SQL Server DBs only on any servers if possible

    Thanks

    Stephen

  • First, locate all the SQL Servers.

    Then, look at each SQL Server to see what databases are on it.

  • 1) locate all SQL servers which is easy to do by running 'osql -L' at the command prompt and pipping it to a text file

    2) bcp that txt file into a table inside a database

    3) add all the servers as linked servers, can be done via a while loop

    4) run select * from [servername]...sys.databases, can be done via a while loop.

    done.

    -----------------------------
    www.cbtr.net
    .: SQL Backup Admin Tool[/url] :.

  • Michael Valentine Jones (4/18/2008)


    First, locate all the SQL Servers.

    Then, look at each SQL Server to see what databases are on it.

    Heh... having one of "those" days, Michael? 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Michael Valentine Jones (4/18/2008)


    First, locate all the SQL Servers.

    Then, look at each SQL Server to see what databases are on it.

    reverse the steps for bonus points.

    ---------------------------------------
    elsasoft.org

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

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