Thank you for all your quick responses :
Carl Christopher Bavington _at_ Langley [Carl.Bavington_at_ntl.com]
Binkley Robert - rbinkl [Robert.Binkley_at_acxiom.com]
gmb-mcg-it-unix-admin [gmb-mcg-it-unix-admin_at_cardinal.com]
The solution that worked was from Spider.Boardman_at_Orb.Nashua.NH.US
His response :
Your example:
ORACLE_ENV=/ora/env/Oracle.env
/bin/su oracle -c ". $ORACLE_ENV ; $DBS/ractrl stop"
uses "" throughout, which means that $DBS must be set in the *invoking*
environment in order to be part of that command. One fix would look
like
this:
ORACLE_ENV=/ora/env/Oracle.env
/bin/su oracle -c ". $ORACLE_ENV ; "'$DBS/ractrl stop'
The '' usage defers the $DBS expansion to the shell run as the oracle
user,
which will do so after finishing the '.' command.
A couple of people suggested /bin/su - oracle, this did not make any
difference.
Darren
-----Original Message-----
From: Browett, Darren
Sent: Friday, March 14, 2003 8:52 AM
To: Tru64-Unix-Managers
Subject: 5.1a - behaviour of su
As part of my backup procedures, I make a call to scripts for shutting
down my databases.
This script has worked with 4.0f but is not working with 5.1a/pk3. The
syntax is
ORACLE_ENV=/ora/env/Oracle.env
/bin/su oracle -c ". $ORACLE_ENV ; $DBS/ractrl stop"
When I run the command I get the following output :
ksh: /ractrl: not found
To me this indicates that $DBS is not being resolved (if that is the
correct term).
I did change the command to /bin/su oracle -c ". $ORACLE_ENV ; printenv"
And $DBS is defined.
Has anybody else seen this behaviour ??
Thanks
Darren
------------------------------------------------------------------------
--------------------------------------------------
Darren Browett P.Eng This
message was transmitted
Data Administrator using
100% recycled electrons
Information and Communication Technology
City of Coquitlam
P:(604)927 - 3614
E:dbrowett_at_city.coquitlam.bc.ca
------------------------------------------------------------------------
---------------------------------------------------
Received on Fri Mar 14 2003 - 17:15:30 NZDT