Script to query all the servers /databases at once
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?
Last edited by Ablakios; 02-09-2006 at 10:06 AM.
The lie takes the elevator, the truth takes the staircase but ends up catching up with the lie.
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..
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.
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.
Originally Posted by davey23uk
this space intentionally left blank
Click Here to Expand Forum to Full Width