Showing posts with label Script To Export Oracle Env Variables Automation. Show all posts
Showing posts with label Script To Export Oracle Env Variables Automation. Show all posts

Saturday, July 8, 2023

Automatically export ORACLE environment variables in Linux

 

cat /etc/oratab | grep -e "^[\a-Az-Z0-9\]\{0,8\}\:*/[[:graph:]]*" | awk -F: '{print $1,$2}' | read a b

$ echo $a

target

 $ echo $b

/usr/local/opt/oracle/app/oracle/product/11.2.0.4


export ORACLE_HOME=$b

export ORACLE_SID=$a

export PATH=$ORACLE_HOME/bin:$PATH


opatchauto

# Log in as root su - root # Execute opatchauto against the unzipped patch directory /u01/app/19.0.0/ grid /OPatch/opatchauto apply /tmp/pat...