Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQLPlus output

Re: SQLPlus output

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 30 May 2002 22:31:27 -0500
Message-ID: <ubsaw9634.fsf@hotpop.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US