Home » Infrastructure » Linux » Problem with user oracle .bash_profile (Oracle 11g R2, Red Hat 5.4)
Problem with user oracle .bash_profile [message #599180] Tue, 22 October 2013 15:28 Go to next message
juamd
Messages: 21
Registered: November 2011
Location: Colombia
Junior Member
Hi !!!!


I have Oracle Database 11g R2 on a linux red hat machine. ORACLE_BASE, ORACLE_HOME, ORACLE_SID are in the oracle's .bash_profile but when I log in as oracle it doesn't load those variables. I have to execute .bash_profile to load its values. What can i do ?

Thanks.

Re: Problem with user oracle .bash_profile [message #599182 is a reply to message #599180] Tue, 22 October 2013 16:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
logon starting a new OS process as OS user "oracle" & immediately do as below

env | sort

COPY the results from above then PASTE all back here
Re: Problem with user oracle .bash_profile [message #599183 is a reply to message #599182] Tue, 22 October 2013 18:01 Go to previous messageGo to next message
juamd
Messages: 21
Registered: November 2011
Location: Colombia
Junior Member
here is the output :


=/bin/env
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=OELBDSRV1
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*. zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/root
OLDPWD=/root
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PWD=/home/oracle
SHELL=/bin/bash
SHLVL=2
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=192.168.2.41 62446 22
SSH_CONNECTION=192.168.2.41 62446 192.168.2.13 22
SSH_TTY=/dev/pts/2
TERM=xterm
USER=oracle


Thanks.
Re: Problem with user oracle .bash_profile [message #599185 is a reply to message #599183] Tue, 22 October 2013 18:12 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
pay attention to the results from the two "cat" commands below

[oracle@localhost ~]$ cat .bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=orcl
export JAVA_HOME=/usr/java/latest

export PATH=$JAVA_HOME/bin:$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/ucp/lib/ucp.jar:$ORACLE_HOME/jdbc/lib/ojdbc6.jar:$CLASSPATH
export CLASSPATH
export XDB_HOL="/home/oracle/Desktop/Database*/XMLDB*/2011"

cat ~/Desktop/README.txt

/sbin/ifconfig | grep "inet addr"


[oracle@localhost ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
export EDITOR=vi
PATH=$PATH:$HOME/bin
export PATH
CLASSPATH=$ORACLE_HOME/ucp/lib/ucp.jar:$ORACLE_HOME/jdbc/lib/ojdbc6.jar:$CLASSPATH
export CLASSPATH

#Added for IMDB Cache labs
export TT_HOME=$HOME/app/oracle/product/TimesTen/tt1122
export TT_SCRIPTS="$HOME/Desktop/Database Track/TimesTen Scripts/imdb_cache"
export TT_RESET="$HOME/Desktop/Database Track/TimesTen Scripts/imdb_cache/.reset"
. $TT_HOME/bin/ttenv.sh
echo IP Address is:
/sbin/ifconfig | grep "inet addr"

export XDB_HOL=/home/oracle/Desktop/Database*/XMLDB*/2011

Re: Problem with user oracle .bash_profile [message #599243 is a reply to message #599180] Wed, 23 October 2013 03:50 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Please post the output from the following command:

grep oracle /etc/passwd
Re: Problem with user oracle .bash_profile [message #599342 is a reply to message #599185] Wed, 23 October 2013 14:48 Go to previous messageGo to next message
juamd
Messages: 21
Registered: November 2011
Location: Colombia
Junior Member
Hi BlackSwan !!!


I did what you told me and it worked but I don't understand what happened there... what is the problem with the file ?


Thanks a lot !!!
Re: Problem with user oracle .bash_profile [message #599344 is a reply to message #599342] Wed, 23 October 2013 15:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I don't know what you did.
I only showed what works for me.
Re: Problem with user oracle .bash_profile [message #599347 is a reply to message #599344] Wed, 23 October 2013 15:26 Go to previous message
juamd
Messages: 21
Registered: November 2011
Location: Colombia
Junior Member
Well.. thanks. I have tried many things but it never worked until now.
Previous Topic: differentiate root level and dba tasks
Next Topic: (ORA-12547: TNS:lost contact | ORA-12541: TNS:no listener)Installing Oracle 11gR2 on Ubuntu 12.04
Goto Forum:
  


Current Time: Fri Mar 29 02:47:50 CDT 2024