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 -> svrmgrl in UNIX

svrmgrl in UNIX

From: Lee Usher <usherl_at_idx.com>
Date: 1998/04/07
Message-ID: <352A1FCB.A4D8E1CC@idx.com>#1/1

Can somebody help me. I am trying to execute svrmgrl from a sh script on Solaris 2.6. If the code to call svrmgrl is not in an if clause, it works. If it is in an if clause, I get this error:

syntax error at line 21: `end of file' unexpected

sqlplus works regardless of the if clause. To me this is wierd. Any suggestions?

Here is my code:

#! /bin/sh
STATUS=`/usr/bin/ps -fu oracle7 | grep "ora_[a-z]*_IDXW" ` if [ $? != 0 ]; then

    echo "Database is up."

sqlplus scott/tiger_at_oracle <<EOF
select table_name from user_tables;
exit
EOF
else

    echo "Database is down."

svrmgrl <<EOF

     connect internal
     alter system switch logfile;
     shutdown immediate;
     exit

EOF
fi

Thanks,
Lee Usher
IDX Systems Corp
usherl_at_idx.com Received on Tue Apr 07 1998 - 00:00:00 CDT

Original text of this message

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