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:
- Configures the environment
- Launches the tool with RLWRAP if available
- Passes any additional arguments to the tool
The scripts are:
- sysdba – launches SQL*Plus / as sysdba
- sysrman – launches RMAN target /
- sysasm – launches SQL*Plus / as sysasm
- asmsh – launches asmcmd
All of these will use RLWRAP if installed.
Download the full package here.
- Posted in: Tales from the Scrypt