Simple command for Oracle in script oracle_script.sh:
Text of script:
#Test connect to database Oracle
sqlplus / as sysdba <<EOF
select * from dual;
quit
EOF
#Work with recovery manager (rman)
rman target / <<EOF
show all;
exit
EOF
Run script:
$ ./oracle_script.sh
Text of SQL file for run sql query
Text script.sql:
select * from dual;
quit
Run file script.sql:
$ sqlplus / as sysdba @script.sql
|