Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

 
 

ss

Oracle Tips by Burleson 

Get the fully-qualified UNIX path names for directories

This section of the script gets the full path name for the UNIX directories. The tricky part of this is when Oracle uses a question mark, and not the fully-qualified UNIX path name to the directory. In this case, we need to prefix the name with the value from the $ORACLE_HOME variable.

#*************************************************************
# If the first character of the dump directory is a question-mark (?)
# then replace it with $ORACLE_HOME
#*************************************************************
sed 's/?/$ORACLE_HOME/g' /tmp/dump_$ORACLE_SID.ora > \
tmp/dump1_$ORACLE_SID.ora

ALERT_DIR=`cat /tmp/alert_log_dir_${ORACLE_SID}.ora|awk '{print $1}'`
export ALERT_DIR

#*************************************************************
# If the first character of the alert ora directory is a question-mark (?)
# then prefix with $ORACLE_HOME
#*************************************************************

first_char=`echo $ALERT_DIR|grep ^?|wc -l`
first_num=`expr $first_char`
#echo $first_char
if [ $first_num -eq 1 ]
then
new=`echo $ALERT_DIR|cut -d? -f2`
ALERT_DIR=${ORACLE_HOME}$new
fi


The above is an excerpt from the "Oracle9i UNIX Administration Handbook" by Oracle press, authored by Donald K. Burleson.

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

 

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

Hit Counter