Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

cannot run sqlplus.exe inside a shell script

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Database Connectivity Forum >> cannot run sqlplus.exe inside a shell script Page: [1]
Login
Message << Older Topic   Newer Topic >>
cannot run sqlplus.exe inside a shell script - Apr. 12, '06, 1:52:48 PM   
kwoksiu

 

Posts: 3
Joined: Apr. 11, '06,
Status: offline
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.
Post #: 1
RE: cannot run sqlplus.exe inside a shell script - Apr. 12, '06, 2:23:09 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
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.

(in reply to kwoksiu)
Post #: 2
RE: cannot run sqlplus.exe inside a shell script - Apr. 12, '06, 3:16:52 PM   
kwoksiu

 

Posts: 3
Joined: Apr. 11, '06,
Status: offline
without setting ORACLE_HOME, the script runs successfully.

Great help. Thanks.

(in reply to Rodney)
Post #: 3
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Database Connectivity Forum >> cannot run sqlplus.exe inside a shell script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.031