Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

ksh .profile for Oracle

Oracle sample scripts by Donald BurlesonApril 28, 2015

Question:  I need to use a sample UNIX .profile file for my login profile using the Korn Shell.  Can you show a sample .profile for ksh for Oracle?

Answer: Here is a sample UNIX/Linux ksh profile file for Oracle:

cat .profile.ksh

#!/bin/ksh


umask 022

DBABRV=ora; export DBABRV


ORACLE_TERM=vt100; export ORACLE_TERM

TERM=vt100; export TERM

wout=`who am i`

#DISPLAY=`expr "$wout" : ".*(\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\))"`
DISPLAY="${DISPLAY}:0"; export DISPLAY

ORAENV_ASK=NO; export ORAENV_ASK

export EDITOR=vi

NLS_LANG='english_united kingdom.we8iso8859p1'; export NLS_LANG

ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33

JAVA_HOME=/usr/local/jre; export JAVA_HOME

ORACLE_HOME=/u01/app/oracle/product/9.2.0; export ORACLE_HOME

PATH=.:$PATH:.;$ORACLE_HOME/dcm/bin/:$ORACLE_HOME/j2ee/home/:$ORACLE_HOME/ldap/bin/
:$ORACLE_HOME/ldap/odi/admin/:$ORACLE_HOME/oca/bin/:$ORACLE_HOME/opmn/bin/:$ORACLE_HOME/
portal/admin/plsql/sso/:$ORACLE_HOME/sso/lib/:$ORACLE_HOME/uddi/lib/:$ORACLE_HOME/
upgrade/:$ORACLE_HOME/wireless/bin/

#*****************************************************************
# Keyboard
#*****************************************************************
stty erase ^?
set -o vi
#*****************************************************************
# Standard UNIX Prompt
#*****************************************************************
ORACLE_SID=iasdb; export ORACLE_SID
PS1="
`hostname`*\${ORACLE_SID}-\${PWD}
>"
export PS1


   # For every Oracle_SID in /var/opt/oracle/oratab,
   # create an alias using the SID name.
   # Now, entering the ORACLE_SID at the UNIX prompt will completely set
   # the UNIX environment for that SID
   #*****************************************************************

   for DB in `cat /var/opt/oracle/oratab| \
   grep -v \#|grep -v \*|cut -d":" -f1`
   do
      alias $DB='export ORAENV_ASK=NO; export ORACLE_SID='$DB'; .
TEMPHOME/bin/oraenv; export ORACLE_HOME; export ORACLE_BASE=`echo
ORACLE_HOME | sed -e 's:/product/.*::g'`; export DBA=$ORACLE_BASE/admin;
xport SCRIPT_HOME=$DBA/scripts; export PATH=$PATH:$SCRIPT_HOME; export
IB_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib:/usr/lib '
   done

 


#*****************************************************************
# Aliases
#*****************************************************************

# Oracle database aliases
alias alert='tail -100 $DBA/$ORACLE_SID/bdump/alert_$ORACLE_SID.log|more'
alias arch='cd $DBA/$ORACLE_SID/arch'
alias bdump='cd $DBA/$ORACLE_SID/bdump'
alias cdump='cd $DBA/$ORACLE_SID/cdump'
alias pfile='cd $DBA/$ORACLE_SID/pfile'
alias udump='cd $DBA/$ORACLE_SID/udump'
alias rm='rm -i'
alias sid='env|grep -i sid'
alias admin='cd $DBA/admin'
alias logbook='/u01/app/oracle/admin/$ORACLE_SID/logbook'

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster