Flexible Sqlplus command line history with RLWRAP

At Hotsos Symposium Training Day I used rlwrap with sqlplus – which gives nice command line editing and history capabilities for tools like sqlplus. Additionally I pre-generated commonly used Oracle keywords, data dictionary view and package names into rlwrap wordfile, so I got nice tab-completion too. Sqlplus sucks much less with rlwrap ;-)

It’s relatively easy to install rlwrap on Unix (there are rlwrap RPMs out there, Solaris freeware packages and I installed it on Mac via macports.org). Just google around…

You can have rlwrap on Windows too – As rlwrap has been coded for Unix flavors, then on Windows you need to run it on a Unix library environment emulator – like Cygwin.

Dave Herring and Michael Paddock have both written an article about how to get rlwrap & sqlplus running on Windows, check out the articles here. It’s worth reading both as they have different additions…

So, if you want command line history, search and tab completion for sqlplus on Unix flavors or Windows, check these articles out!

http://daveherringsdbablog.blogspot.com/2010/03/sqlplus-command-history-with-cygwin.html

http://blog.enkitec.com/2010/04/29/using-sqlplus-with-rlwrap-on-ms-windows/

  • Share/Bookmark

Tanel Poder
Administration, Cool stuff, Oracle, Productivity, Tools

  1. Trackbacks

  2. No trackbacks yet.
  1. Comments

  2. May 10th, 2010 at 07:06 | #1

    ied does a similar thing on HP-UX

  3. May 19th, 2010 at 08:51 | #2

    This is a lesson I took well to heart at the Hotsos Symposium. Although I have used rlwrap for some time now, I wasn’t aware of how powerful it really is.
    Like the others, I took the liberty to write some blog posts on this issue myself.
    Thanks for the info!

  4. Nigel
    May 25th, 2010 at 04:52 | #3

    Hi Tanel,

    I think you’ll find that blogging about rlwrap and SQL*Plus is a dangerous practice:
    http://www.oracle-base.com/blog/2008/01/09/rlwrap

    Nigel

  5. May 25th, 2010 at 12:12 | #4

    @Nigel
    Ha! I don’t give a damn :)

  6. August 19th, 2010 at 10:26 | #5

    The more the merrier. Even with all these blog posts bouncing around, a lot of people still don’t use rlwrap. Even more use their terminals’ default settings and don’t even set -o vi!