views:

28

answers:

0

I would like to know how to do this: Environment: UNIX I would like to write a script which can be scheduled to run on a remote machine. It would read the DB details (which is residing on another machine) from a config file which looks like this:

user=
pass=
product1_SID=
product2_SID=
...

Each product has its own database files. So the script should retrieve the details like this:

1. Connect to the remote DB.

2. foreach(SID_in_config_file){
        retrieve details from dba_data_files 
        send Resultset to log
   }
3. Close connection