Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: svrmgrl in UNIX
Lee Usher wrote:
> 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
We experienced this problem for the first time using oracle 7.3.4 on HP_UX 10.20. There is a bug in server manager. Patch (for HP at least) is 622943. Workaround is to imbed svrmgrl command in a script file and put svrmgrl command=@scriptfile.name into your shell instead of <<EOF. Received on Tue Apr 07 1998 - 00:00:00 CDT
![]() |
![]() |