Hi Dave, If the script just sets variables and exits and then you call sqlplus from the command line (or another script) then you need to call the initial script like this: . script Regards, Fergal On 28 Jul 2014 13:17, "Dave Morgan" <oracle@xxxxxxxxxxx> wrote: > Hello All, > I am having a problem setting ORACLE_SID using env variables. > For example, in a bash script: > > export SS_DB=ABCDB > export TT_DB=DEFDB > > export ORACLE_SID=$SS_DB > > sqlplus fails with Oracle not available, no shared memory. However, > echo $ORACLE_SID returns ABCDB. > > If I then set ORACLE_SID directly: > > export ORACLE_SID=ABCDB > > sqlplus works fine > > What am I missing? > > TIA > Dave > > -- > Dave Morgan > Senior Consultant, 1001111 Alberta Limited > dave.morgan@xxxxxxxxxxx > 403 399 2442 > -- > //www.freelists.org/webpage/oracle-l > > >