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. Oracle database didn’t have contain SQL*Plus history before release 12.2. For releases before 12.2, release 12.2 and beyond releases we can use RLWRAP utility for history of SQL*Plus and RMAN prompt.
I. INSTALLATION
You can install this utility for two ways:
A. Installation 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
B. 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
II. 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 must add these aliases to .bash_profile:
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
III. DEMO
Before RLWRAP
oracle> sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 7 21:26:29 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> select name from v$database;
NAME
---------
MBSDB
Tap to up/down key:
SQL> ^[[A^[[B
After RLWRAP
oracle> sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 7 21:40:24 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
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: