LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   need to perform rsh sqlplus (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-perform-rsh-sqlplus-808766/)

elienawfal 05-19-2010 01:58 AM

need to perform rsh sqlplus
 
Hello,
I need to perform rsh servername sqlplus where servername is a redhat server.
if i perform rsh servername sqlplus the following error occur:
ksh: sqlplus: not found

but if i perform rsh servername ls -l the command success

Regards,Elie .

linuxlover.chaitanya 05-19-2010 02:10 AM

Have you checked if sqlplus is in the $PATH variable? Also try to give the complete path for the command and see if it works.

chrism01 05-19-2010 02:12 AM

In addition http://www.informit.com/articles/art...p=169465&rll=1

elienawfal 05-19-2010 03:08 AM

If i perform:
rsh servername /u01/oracle817/bin/sqlplus the following error occur:

Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus

linuxlover.chaitanya 05-19-2010 03:41 AM

http://www.orafaq.com/forum/t/37177/2/

elienawfal 05-19-2010 06:53 AM

It seems that the problem is that $ORACLE_HOME and $ORACLE_SID are not set as environment variable,any one know how to put them as environment variable ???

linuxlover.chaitanya 05-19-2010 07:00 AM

Have not you read the posts in the link? They do mention how to do that. Else search LinuxQuestions.org on how to set the path variable.

alli_yas 05-19-2010 09:00 AM

Quote:

It seems that the problem is that $ORACLE_HOME and $ORACLE_SID are not set as environment variable,any one know how to put them as environment variable ???
Ummm...you're trying to setup Oracle and/or SQL Plus and you don't know what $ORACLE_HOME and ORACLE_SID are?

I suggest that:

1. You read the posts from chaitanya
2. Get someone who knows Oracle to help you.

Cheers
Yas

elienawfal 05-20-2010 12:25 AM

I know very well where $ORACLE_HOME and ORACLE_SID are,but what i need is to put $ORACLE_HOME as environment variable for all the system not only for specified user,because
rsh can not see the oracle pass .
Anyway ,thanks and good day

alli_yas 05-20-2010 02:16 AM

Quote:

I know very well where $ORACLE_HOME and ORACLE_SID are,but what i need is to put $ORACLE_HOME as environment variable for all the system not only for specified user
Well my friend, there are posts in this thread that attempt to help you with that. Have you even tried them? Or are you hoping for a step by step guide that you can simply copy and paste onto your machine?

elienawfal 05-20-2010 05:37 AM

May be you think that you are a genius but i don't think so

Cheers

linuxlover.chaitanya 05-20-2010 05:40 AM

Let the flame wars be. But there are lot of posts that will explain how to configure path variable. Search LQ and you are sure to get your answer.

alli_yas 05-20-2010 07:27 AM

Quote:

May be you think that you are a genius but i don't think so
Where and when did I profess to be a genius? And believe me, it makes such a big difference what you think of me?

Quote:

Let the flame wars be. But there are lot of posts that will explain how to configure path variable. Search LQ and you are sure to get your answer.
Agreed chaitanya.

Not sure about rsh; but for bash; logging in using ssh; cut and paste the following into your .bash_profile - it should work thereafter:

Code:

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=yourdbsid


elienawfal 05-22-2010 02:56 AM

It seems that the problem is that rsh doesn't execute .profile or .bash_profile
because if i perform rsh linux server env the result is:
REMOTEHOST=linux
SHELL=/bin/bash
USER=oracle
PATH=/usr/bin:/bin
PWD=/home/oracle
SHLVL=1
HOME=/home/oracle
REMOTEUSER=oracle


and if i perform env after login to the system with the same user the result is

HOSTNAME=linux
SHELL=/bin/bash
TERM=ansi
HISTSIZE=1000
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P9
QTDIR=/usr/lib/qt-3.1
USER=oracle
LD_LIBRARY_PATH=/u01/oracle817/lib:/lib:/usr/lib:/u01/forms6i/lib
ORACLE_SID=icbs
ORACLE_BASE=/u01
TNS_ADMIN=/u01/oracle817/network/admin
MAIL=/var/spool/mail/oracle
PATH=/u01/oracle817/bin:/u01/forms6i/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/
usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/home/oracle/bin
INPUTRC=/etc/inputrc
PWD=/home/oracle
LANG=en_US.UTF-8
LAMHELPFILE=/etc/lam/lam-helpfile
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=1
HOME=/home/oracle
LD_ASSUME_KERNEL=2.2.5
LOGNAME=oracle
LESSOPEN=|/usr/bin/lesspipe.sh %s
ORA_NLS33=/u01/oracle817/ocommon/nls/admin/data
ORACLE_HOME=/u01/oracle817
G_BROKEN_FILENAMES=1
00000000000000000000000000000000000000000000000000000000000
Any help is appreciated
Regards,Elie

alli_yas 05-24-2010 02:28 AM

Hi

Your reasoning is correct - rsh does not load .bash_profile or .profile. Take a look at this where a few solutions to this are given: http://www.linuxforums.org/forum/lin...-remotely.html

Quote:

ORA_NLS33=/u01/oracle817/ocommon/nls/admin/data
ORACLE_HOME=/u01/oracle817
Looking at the two lines shown from your previous post, it appears that there is some script on your machine that is setting up these environment variables.

Is there a specific reason that you are not logging in via an SSH shell client into bash?


All times are GMT -5. The time now is 02:24 AM.