DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Script to quey all the servers /databases at once

  1. #1
    Join Date
    Dec 2001
    Location
    Baltimore, MD
    Posts
    374

    Question Script to query all the servers /databases at once

    Hi,
    We have about 150 databases and 1700 applications on unix.
    I am a unix neophyte and would like to have shell script that I can feed my query into to get info in all of the databases in one shot rather than running my query in individual database one by one.

    How can I do that?

    Thanks
    Last edited by Ablakios; 02-09-2006 at 10:06 AM.
    Arsene Lupain
    The lie takes the elevator, the truth takes the staircase but ends up catching up with the lie.

  2. #2
    Join Date
    Jun 2007
    Location
    İstanbul/Turkey
    Posts
    25
    put the script that queries the database in all the database server you have.
    Then in one database server write a main script ,that calls the other scripts one by one .For this you can you "rsh" .
    So you ll only run the mainscript in one of your server,and it ll automatically run the other scripts in other servers ,and you ll get the infos of all the databases..

  3. #3
    Join Date
    Jun 2007
    Location
    İstanbul/Turkey
    Posts
    25
    bytheway ,to use rsh ,you need to install the rpm of rsh and rsh server to all of your db servers in order to be able to use remote shell.

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    use ssh, more secure

  5. #5
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by davey23uk
    use ssh, more secure
    It certainly is, and if you setup public/private key authentication you won't need to log on when running queries on other servers or scp'ing the results back.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width