|
|
|
|
||||||
| comp.security.ssh SSH secure remote login and tunneling tools. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi you all,
I'm trying to execute an script which uses sqlplus from a remote ssh client. The script runs ok executing it from the server. I'm executing the following line: ssh user@host script.sh The script only connects sqlplus (sqlplus user@pass/DB_SID) And I get the followin message: bash: sqlplus: command not found Any ideas? Thanks a lot |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 11 Dec 2006 04:41:38 -0800
"_mamarin_" <ma.marin.m@gmail.com> wrote: > Hi you all, > > I'm trying to execute an script which uses sqlplus from a remote ssh > client. > The script runs ok executing it from the server. > > I'm executing the following line: ssh user@host script.sh > The script only connects sqlplus (sqlplus user@pass/DB_SID) > And I get the followin message: > bash: sqlplus: command not found > > > Any ideas? > > Thanks a lot > You probably need to either specify the entire path to SQLPlus, similar to /opt/oracle/920/bin/sqlplus, or set your environment PATH prior to running SQLPlus to include the directory where SQLPlus exists. Doug -- For UNIX, Linux and security articles visit http://SecurityBulletins.com/ |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks to you all...
"sourcing" the bash_profile into my script was the besto option at least!! #!/bin/bash .. ~/.bash_profile ![]() Doug Spencer ha escrito: > On 11 Dec 2006 04:41:38 -0800 > "_mamarin_" <ma.marin.m@gmail.com> wrote: > > > Hi you all, > > > > I'm trying to execute an script which uses sqlplus from a remote ssh > > client. > > The script runs ok executing it from the server. > > > > I'm executing the following line: ssh user@host script.sh > > The script only connects sqlplus (sqlplus user@pass/DB_SID) > > And I get the followin message: > > bash: sqlplus: command not found > > > > > > Any ideas? > > > > Thanks a lot > > > > You probably need to either specify the entire path to SQLPlus, similar to /opt/oracle/920/bin/sqlplus, or set your environment PATH prior to running SQLPlus to include the directory where SQLPlus exists. > > Doug > > -- > For UNIX, Linux and security articles > visit http://SecurityBulletins.com/ |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
_mamarin_ wrote:
> Thanks to you all... > > "sourcing" the bash_profile into my script was the besto option at > least!! > That's what you needed to do. Remember that when you remotely execute a script, it's just like executing it from cron - you get a bare minimum shell environment. If any command in your script depends on environment variables like PATH or LD_LIBRARY_PATH, it's a good practice to explicitly set them in your script. Sqlplus us one such command. Oracle provides a script named oraenv for doing that. You source it in your script. export ORACLE_SID=YOURSID export ORAENV_ASK=NO .. oraenv # (or ./usr/local/bin/oraenv) [ rest of script ] |
|
![]() |
| Outils de la discussion | |
|
|