Assume I wrote a simple SQL statement (SELECT ...FROM...WHERE....) for an existing Oracle DB and put it in a separate *.sql file on Solaris v11.
Now I want to connect from inside a shell script to the Oracle DB and pass this *.sql script for execution.
The resulting database rows should be retrieved into CSV file for later (script) processing.
From Windows batch script I could do this by entering a command similar to
sqlplus.exe username/password@database @blah.sql >output.log
Is there a similar DB client like sqlplus.exe on Solaris?
How else can I achieve such a processing?
Do I have to obey something special (e.g. to make result file human readable)?
Is there somewhere an example script for DB access?
Thank you
Peter