Run oracle form bash
I'm trying to run oracle sql statement form bash.
It's possible to run a oracle sentence with:
sqlplus user/pass@sid <<End
The problem is that it's a bit slow due to continues connections.
Is possible to open a oracle connection and redirect request with exec?
what I try is to open it with
sqplus user/pass@sid >&3
now I what to run my script and every time I want to do a request to Oracle, not to have to open the connection (it's already open), just redirect the input/output:
select * from dual; 0>&3
And receive the unanswered with
read result 1<&3
And finally do:
This is the idea, but don't know if is possible and the syntax I have to use with the redirectors of &3 (don't know how exec and &3 is used).