LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2010, 02:58 AM   #1
elienawfal
LQ Newbie
 
Registered: May 2010
Posts: 13

Rep: Reputation: 0
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 .
 
Old 05-19-2010, 03:10 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 05-19-2010, 03:12 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
In addition http://www.informit.com/articles/art...p=169465&rll=1
 
Old 05-19-2010, 04:08 AM   #4
elienawfal
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 05-19-2010, 04:41 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
http://www.orafaq.com/forum/t/37177/2/
 
Old 05-19-2010, 07:53 AM   #6
elienawfal
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
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 ???
 
Old 05-19-2010, 08:00 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 05-19-2010, 10:00 AM   #8
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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
 
Old 05-20-2010, 01:25 AM   #9
elienawfal
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 05-20-2010, 03:16 AM   #10
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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?
 
0 members found this post helpful.
Old 05-20-2010, 06:37 AM   #11
elienawfal
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
May be you think that you are a genius but i don't think so

Cheers
 
Old 05-20-2010, 06:40 AM   #12
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 05-20-2010, 08:27 AM   #13
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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
 
Old 05-22-2010, 03:56 AM   #14
elienawfal
LQ Newbie
 
Registered: May 2010
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 05-24-2010, 03:28 AM   #15
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sqlplus problem kshkid Programming 8 05-09-2007 08:20 PM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 10:34 AM
How to run sqlplus? sikandar Linux - Software 5 09-01-2003 01:42 AM
SQLPLUS Help with 5 Questions kb2010 Programming 3 09-03-2002 09:14 AM
Sqlplus mikeshn Programming 1 07-16-2002 11:13 PM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration