Network Database Access
i have two different networks e.g. N1, N2. Each network has its local management server MS1, MS2. Management servers have the access of their local sub-net. And management server also have access of another management server of another network. I have database servers in each network e.g DB1, DB2, these database servers are directly accessible from their local management servers. I have no direct access of database of any other network, except through its local management server.
So, I often execute some common script on dbs, I have problem of every time to get login through my local management server and then further login to another management server and then their databases for executing same script. 
I need some programmatic solution in java/other, to virtually have access of all databases of another networks using their local management servers transparently.
Network Database Access
===

i have two different networks e.g. N1, N2. Each network has its local management server MS1, MS2. Management servers have the access of their local sub-net. And management server also have access of another management server of another network. I have database servers in each network e.g DB1, DB2, these database servers are directly accessible from their local management servers. I have no direct access of database of any other network, except through its local management server.
So, I often execute some common script on dbs, I have problem of every time to get login through my local management server and then further login to another management server and then their databases for executing same script. 
I need some programmatic solution in java/other, to virtually have access of all databases of another networks using their local management servers transparently.