the nitty gritty – Using sqlplus/rman with bash like cli-wrapper and comand-completition

 Datenbank, Linux  Kommentare deaktiviert für the nitty gritty – Using sqlplus/rman with bash like cli-wrapper and comand-completition
Jan 072016
 

Step 1.)
– Download rpm-package rlwrap-0.37-1.el5.x86_64.rpm (for example: http://rpm.pbone.net/)

Step 2.)
– Install the package

# yum --nogpgcheck localinstall rlwrap-0.42-1.1.x86_64.rpm

Step 3.)
– Configure your own cli dictionary
– Build a new shell-alias in the oracle user’s .bashrc

# su - oracle
# vi .oracle_keywords
select
insert
update
...
  
# vi .bashrc
...
alias sqlplus='/usr/bin/rlwrap -if $HOME/.oracle_keywords $ORACLE_HOME/bin/sqlplus'
alias rman='/usr/bin/rlwrap -if $HOME/.oracle_keywords $ORACLE_HOME/bin/rman'
...

Step 4.)
– Enjoy the benefit of cli completition, command wrapping for sqlplus and rman.

 Posted by at 5:22 pm