RE: Linux sqlplus scriting question

  • From: "Reidy, Ron" <Ron.Reidy@xxxxxxxxxxxxxxxxxx>
  • To: <JBECKSTROM@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>, <oracle-db-l@xxxxxxxxxxxxxxxxxxxx>, <ORACLE-L@xxxxxxxxxxxxx>, <oracle-rdbms@xxxxxxxxxxxxxxx>
  • Date: Tue, 23 May 2006 08:57:48 -0600

The second '<<EOF' should be 'EOF'.

So what happens is sqlplus fails?

 

________________________________

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Jeffrey Beckstrom
Sent: Tuesday, May 23, 2006 6:37 AM
To: oracle-l@xxxxxxxxxxxxx; oracle-db-l@xxxxxxxxxxxxxxxxxxxx;
ORACLE-L@xxxxxxxxxxxxx; oracle-rdbms@xxxxxxxxxxxxxxx
Subject: OT: Linux sqlplus scriting question

 

I am trying to make a script to stop the OMS and restart it after
running sqlplus.  Right now testing with select from DUAL.

 

# set Oracle_home
ORACLE_HOME=/home/oracle/OracleHomes/db10g
export ORACLE_HOME

 

# stop OMS
cd /home/oracle/OracleHomes/oms10g/opmn/bin
./opmnctl stopall
/home/oracle/OracleHomes/db10g/bin/sqlplus /nolog <<EOF
connect sysman/rtasys1@gridctrl
select * from dual;
exit
<<EOF
# start OMS
cd /home/oracle/OracleHomes/oms10g/opmn/bin
./opmnctl startall

 

The script is stopping after doing sqlplus, what am I missing?

 

Jeffrey Beckstrom
Database Administrator
Greater Cleveland Regional Transit Authority
1240 W. 6th Street
Cleveland, Ohio 44113


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Other related posts: