cannot run sqlplus.exe inside a shell script (Full Version)

All Forums >> [SFU / Interix / SUA Technology] >> Database Connectivity Forum



Message


kwoksiu -> cannot run sqlplus.exe inside a shell script (Apr. 12, '06, 1:52:48 PM)

I can sqlplus from system prompt:

$ uname -a
Interix TXSLLCOMXP712 3.5 SP-8.0.1969.1 x86 Intel_x86_Family6_Model13_Stepping6
$ sqlplus.exe

SQL*Plus: Release 9.2.0.1.0 - Production on Tue Apr 11 14:58:37 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

---------------------------------------------------
However, I cannot sqlplus inside a shell script:

$ cat l.sh
#!/bin/ksh

ORACLE_HOME="/usr/apps/oracle/product/9.2.0"
ORACLE_SID="sunny"
export ORACLE_HOME ORACLE_SID

echo $ORACLE_HOME
whence sqlplus.exe

$ORACLE_HOME/bin/sqlplus.exe <<EOT
select * from v\$isntance;
EOT
$
$ l.sh
/usr/apps/oracle/product/9.2.0
/usr/apps/oracle/product/9.2.0/bin/sqlplus.exe
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Any idea or input is welcome.




Rodney -> RE: cannot run sqlplus.exe inside a shell script (Apr. 12, '06, 2:23:09 PM)

The program is a Win32 program.
So try setting the ORACLE_HOME content as a Win32 path rather than
a Unix path. Only PATH gets converted back and forth automatically -- no others.
Or, maybe, don't set it at all because it's already done in Win32-world.




kwoksiu -> RE: cannot run sqlplus.exe inside a shell script (Apr. 12, '06, 3:16:52 PM)

without setting ORACLE_HOME, the script runs successfully.

Great help. Thanks.




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.016