Bash profile example for oracle account on Linux / Unix

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

# Oracle Settings

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=testdb.domainname; export ORACLE_HOSTNAME

ORACLE_UNQNAME=testdb; export ORACLE_UNQNAME
ORACLE_BASE=/u01/oracle/11.2.0; export ORACLE_BASE
ORACLE_SID=testdb; export ORACLE_SID
ORACLE_HOME=/u01/oracle/11.2.0/db_home; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

BASE_PATH=/usr/sbin:$PATH:$HOME/bin; export BASE_PATH

PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

alias sql=’sqlplus / as sysdba’

alias home=’cd $ORACLE_HOME’
alias db=’export ORACLE_SID=testdb’
alias alert_db=’tail -55f /u01/oracle/11.2.0/diag/rdbms/testdb/testdb/trace/alert_testdb.log’

Comments

Popular posts from this blog