sqlplus: activate sqlplus history

Natively oracle's sqlplus do not permit search history for previous commands.

There's a way to do it with rlwrap. you can also do a alias to always use it.

rlwrap depends of gnu readline, it's secure to download and install:
ftp://ftp.gnu.org/gnu/readline/

tar xvf readline-6.1.tar.gz
cd readline-6.1;
./configure --prefix=/usr;
make;

as root or sudo:
make install;



Now download the rlwrap from:
http://utopia.knoware.nl/~hlub/uck/rlwrap/

unzip, compile and install:
tar xvf rlwrap-0.37.tar.gz
cd rlwrap-0.37;
./configure --prefix=/usr;
make;

as root or sudo:
make install;
ldconfig;


To make things ease:
alias sqlplus="rlwrap sqlplus"


You can add the above line(alias) to /etc/bash.bashrc or ~/.bashrc to make it persistent.
Postar um comentário

Postagens mais visitadas