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.  Each one of these scripts takes the ORACLE_SID as the first argument:

  1. Configures the environment
  2. Launches the tool with RLWRAP if available
  3. Passes any additional arguments to the tool

The scripts are:

  1. sysdba – launches SQL*Plus / as sysdba
  2. sysrman – launches RMAN target /
  3. sysasm – launches SQL*Plus / as sysasm
  4. asmsh – launches asmcmd

All of these will use RLWRAP if installed.

Download the full package here.

 

Comments are closed.