Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQLPlus output
On 30 May 2002, nmangalath_at_hotmail.com wrote:
> from the shell script:
> ==============================================================================
> sqlplus "${LOGINID}" <<EOF set echo on set feedback on
>
> alter database backup controlfile to '${BACKUP_DIR}/controlfile';
> alter database backup controlfile to trace;
> exit
>
> EOF
Could you do this? Is the KSH?
#!/bin/ksh
exec_sql (){
echo "I'm executing the following command:\n$Command"
sqlplus ${LOGINID} << EOF
$COMMAND
exit
EOF
COMMAND="alter database backup controlfile to '${BACKUP_DIR}/controlfile';"
exec_sql
COMMAND="alter database backup controlfile to trace;"
exec_sql
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Thu May 30 2002 - 22:31:27 CDT