Sqlplus command line history.

If you are running sqlplus or RMAN on Windows than you can use upper arrow to get history.What about linux?

First option:

1) Install  readline wrapper:

 yum install rlwrap

2) Change    .bashrc and make alias :

alias sqlplus=’rlwrap sqlplus’ alias rman=’rlwrap rman’

 The other option is to install  qqlplus which you can find on the link

http://gqlplus.sourceforge.net/

I tried it on my Oracle 11 running Linux 64bit and did not work.I used already made executable under Linux folder ( included into compressed source file )  but I am sure this can be fixed by comipiling source code.

Advertisement
Comments
One Response to “Sqlplus command line history.”
  1. I would like to remind you that rlwrap is not a tool supported by oracle, so prefer something like

    alias s=’rlwrap sqlplus’

    use “s” for fun and development and keep using sqlplus for your “important” stuff.

    One difference is that rlwrap does not react to CTRL-C the same way sqlplus does, that is if you want to interrupt a long running query, rlwrap sucks :(

    Regards
    Laurent

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s