I need to create a shell script to do this:
- ssh to another remote host
- use sqlplus on that host and spool command to get the data from oracle db into a file
- transfer the file from that host to my host
- excute another shell script to process the data file
I have finished the 4th step shell script. Now I have to do this 4 steps one by one. I want to create a script and do them all. Is that possible? How to transfer the data from one host to my host?
I think maybe the db file is not necessary.
Note: I have to ssh to another host to use sqlplus. It is the only one host which have the permission to access database.
Or
Or, all in one: