dbTalk Databases Forums  

dbstart with wrong shell / wrong systax

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss dbstart with wrong shell / wrong systax in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sven Hilmer
 
Posts: n/a

Default dbstart with wrong shell / wrong systax - 01-31-2010 , 09:03 AM






hi all

After installing Oracle database 11.2 on Solaris 10 x86
the dbstart script doesn't work because of the interpreter
is set to /bin/sh but the script uses syntax of ksh/bash .

dbstart:
line 1:#!/bin/sh
....
line 89:export ORACLE_HOME=$ORACLE_HOME_LISTNER


This export statement is illegal for bourne shell
so the script exits with an error message and doesn't the database processes

How do you solve this problem?

Sven

--
Sven-Olaf Hilmer, Solaris System Engineer
http://www.hilmer-informatik.ch

Reply With Quote
  #2  
Old   
Michel Cadot
 
Posts: n/a

Default Re: dbstart with wrong shell / wrong systax - 01-31-2010 , 09:38 AM






"Sven Hilmer" <shilmer (AT) invalid (DOT) invalid> a écrit dans le message de news: hk42j0$nek$1 (AT) news (DOT) albasani.net...
Quote:
hi all

After installing Oracle database 11.2 on Solaris 10 x86
the dbstart script doesn't work because of the interpreter
is set to /bin/sh but the script uses syntax of ksh/bash .

dbstart:
line 1:#!/bin/sh
...
line 89:export ORACLE_HOME=$ORACLE_HOME_LISTNER


This export statement is illegal for bourne shell
so the script exits with an error message and doesn't the database processes

How do you solve this problem?

Sven

--
Sven-Olaf Hilmer, Solaris System Engineer
http://www.hilmer-informatik.ch
Change it to a syntax it accepts.
It has been long since I used sh but it is valid for Korn shell.

Regards
Michel

Reply With Quote
  #3  
Old   
John D Groenveld
 
Posts: n/a

Default Re: dbstart with wrong shell / wrong systax - 01-31-2010 , 03:54 PM



In article <hk42j0$nek$1 (AT) news (DOT) albasani.net>,
Sven Hilmer <shilmer (AT) invalid (DOT) invalid> wrote:
Quote:
After installing Oracle database 11.2 on Solaris 10 x86
the dbstart script doesn't work because of the interpreter
is set to /bin/sh but the script uses syntax of ksh/bash .
Old bug.

My dbora init.d(4) script invokes dbstart like this:
su - $ORA_OWNER -c "ksh $ORA_HOME/bin/dbstart"

You can do something similar in smf(5) machinery.

John
groenveld (AT) acm (DOT) org

Reply With Quote
  #4  
Old   
Tim X
 
Posts: n/a

Default Re: dbstart with wrong shell / wrong systax - 01-31-2010 , 04:25 PM



"Michel Cadot" <micadot{at}altern{dot}org> writes:

Quote:
"Sven Hilmer" <shilmer (AT) invalid (DOT) invalid> a écrit dans le message de news: hk42j0$nek$1 (AT) news (DOT) albasani.net...
| hi all
|
| After installing Oracle database 11.2 on Solaris 10 x86
| the dbstart script doesn't work because of the interpreter
| is set to /bin/sh but the script uses syntax of ksh/bash .
|
| dbstart:
| line 1:#!/bin/sh
| ...
| line 89:export ORACLE_HOME=$ORACLE_HOME_LISTNER
|
|
| This export statement is illegal for bourne shell
| so the script exits with an error message and doesn't the database processes
|
| How do you solve this problem?
|
| Sven
|
| --
Change it to a syntax it accepts.
It has been long since I used sh but it is valid for Korn shell.

It is also valid for bASH, but its been so long since I used vanilla sh,
I can't remember if its valid there also.

I'd just change the script to either use bash or change that
Quote:
export ORACLE_HOME=$ORACLE_HOME_LISTNER

to
ORACLE_HOME=$ORACLE_HOME_LISTNER>
export ORACLE_HOME

Tim
--
tcross (at) rapttech dot com dot au

Reply With Quote
  #5  
Old   
Mark D Powell
 
Posts: n/a

Default Re: dbstart with wrong shell / wrong systax - 01-31-2010 , 07:37 PM



On Jan 31, 9:03*am, Sven Hilmer <shil... (AT) invalid (DOT) invalid> wrote:
Quote:
hi all

After installing Oracle database 11.2 on Solaris 10 x86
the dbstart script doesn't work because of the interpreter
is set to /bin/sh but the script uses syntax of ksh/bash .

dbstart:
line *1:#!/bin/sh
...
line 89:export ORACLE_HOME=$ORACLE_HOME_LISTNER

This export statement is illegal for bourne shell
so the script exits with an error message and doesn't the database processes

How do you solve this problem?

Sven

--
Sven-Olaf Hilmer, Solaris System Engineerhttp://www.hilmer-informatik.ch
Have you just tried changing shell to specify !/bin/ksh. We use the
korn shell for our Oracle setting and starting scripts.

HTH -- Mark D Powell --

Reply With Quote
  #6  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: dbstart with wrong shell / wrong systax - 02-03-2010 , 03:47 AM



Sven Hilmer wrote:
Quote:
hi all

After installing Oracle database 11.2 on Solaris 10 x86
the dbstart script doesn't work because of the interpreter
is set to /bin/sh but the script uses syntax of ksh/bash .

dbstart:
line 1:#!/bin/sh
...
line 89:export ORACLE_HOME=$ORACLE_HOME_LISTNER


This export statement is illegal for bourne shell
so the script exits with an error message and doesn't the database processes

How do you solve this problem?

Sven

--
Sven-Olaf Hilmer, Solaris System Engineer
http://www.hilmer-informatik.ch
frank@cs-frank03:~$ bash
frank@cs-frank03:~$ echo $ORACLE_HOME_LISTNER

frank@cs-frank03:~$ echo $ORACLE_HOME

frank@cs-frank03:~$ export ORACLE_HOME_LISTNER=Blah
frank@cs-frank03:~$ echo $ORACLE_HOME_LISTNER
Blah
frank@cs-frank03:~$ export ORACLE_HOME=$ORACLE_HOME_LISTNER
frank@cs-frank03:~$ echo $ORACLE_HOME_LISTNER
Blah
frank@cs-frank03:~$ exit
exit
frank@cs-frank03:~$

Beware, LISTNER is usually written as LISTENER (note the extra E)
Also beware dbshut and dbstart usually are called during system
startup/shutdown, not meant for 'normal' operations

--

Regards, Frank van Bortel

Topposting in Usenet groups I regard as offensive - I will not reply

Reply With Quote
  #7  
Old   
Sven Hilmer
 
Posts: n/a

Default Re: dbstart with wrong shell / wrong systax - 03-26-2010 , 02:43 AM



John D Groenveld wrote:

Quote:
My dbora init.d(4) script invokes dbstart like this:
su - $ORA_OWNER -c "ksh $ORA_HOME/bin/dbstart"
I've choosen your solution as it avoids modifying Oracle code.
Thank you John for your help.

kind regards
Sven

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.