Hi all,

It’s my first blog post and I am very happy for writing this blog 😊 Because I like sharing my experiences with all of the clients, people and especially Oracle lovers. I hope you love this blog and like it.

Let’s start first post!

I think you know this utility but I want to talk about it on my blog too.  Because the RLWRAP (ReadLineWrapper) utility is very useful for Oracle DBA’s who administrate database on Linux/Unix systems. This utility’s benefit is you can work with SQL*Plus and/or RMAN prompt’s history, and you win time that is very important for DBAs.

A. INSTALLATION

You can install this utility for two ways:

A.1. Install from EPEL

Firstly, you must configure epel as follows;

root> rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

And then, you can install rlwrap;

root> yum install rlwrap
A.2. Manual Installation

Download the latest version of this software with this link:

https://github.com/hanslub42/rlwrap

After download software, you can install manually as follows:

root> gunzip rlwrap*.gz
root> tar -xvf rlwrap*.tar
root> cd rlwrap*
root> ./configure
root> make
root> make check
root> make install

B. USAGE

For using RLWRAP utility; you can use ‘rlwrap sqlplus’ instead of ‘sqlplus’ and you can use ‘rlwrap rman’ instead of ‘rman’.

For automate this; you can add these aliases to .bash_profile:

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

C. DEMO

Before RLWRAP

oracle> sqlplus / as sysdba

SQL> select name from v$database;

       NAME
       ---------
       MBSDB

Tap to up/down key:

SQL> ^[[A^[[B

After RLWRAP

oracle> sqlplus / as sysdba

SQL> select name from v$database;

       NAME
       ---------
       MBSDB

Tap the up key;

SQL> select name from v$database;

       NAME
       ---------
       MBSDB

That’s all. I hope you like.
See you next post.

References:
1. https://oracle-base.com/articles/linux/rlwrap
2. http://www.dba-oracle.com/t_rlwrap.htm
3. https://blogs.oracle.com/wim/using-epel-repos-with-oracle-linux