Category Archives: Tales from the Scrypt

oraenv on Steroids part 5

While the oraenv script can be called from the command line, and is useful for both RDBMS and Grid utilities, [oracle@oracle-linux ~]$ oraenv dbinternals ORACLE_SID: dbinternals ORACLE_HOME: /u01/app/oracle/product/12.1.0/db [oracle@oracle-linux ~]$ oraenv –grid dbinternals ORACLE_SID: +ASM ORACLE_HOME: /u01/app/oracle/product/12.1.0/grid That is not really where the power is.  The power is when you use it in other scripts.  …

Read more »

oraenv on Steroids part 4

Once we have the $ORACLE_SID and $ORACLE_HOME, we can now assign environment variables for important files that are always used but a pain in the ass to manage: PFILE – Points to $ORACLE_HOME/dbs/init$ORACLE_SID.ora ORAPW – Points to the password file $ORACLE_HOME/dbs/orapw$ORACLE_SID RLWRAP – Is rlwrap installed?  If so it will be used by other scripts …

Read more »

oraenv on Steroids part 3

In the last blog, we got a simple oraenv script that will work correctly on all of  your Oracle servers.  We will be covering using this to manage our servers, but first a word about an important package you should have in your YUM repositories: rlwrap  (“read line wrapper”) What does it do?  It extends …

Read more »

oraenv on Steroids part 2

In oraenv on Steroids Part 1, we demonstrated a way to extract the correct values for $ORACLE_SID and $ORACLE_HOME.  Now we need to put it into a script and use it.  Let’s just take the commands and put them in a script “oenv” that we will put in our path.  We will also add $ORACLE_HOME/bin …

Read more »

oraenv on Steroids Part 1

Most DBA’s have encountered the oraenv script, the one that is generated by root.sh: This script is just as useless as it was in 1993.  If you just have to enter the $ORACLE_SID and $ORACLE_HOME, why do you even need this script?  In 25 years of Oracle DBA experience I have never once used it.  …

Read more »