About Linux FAQ

Browse More FAQs:

How do I enable SQL *Plus Up and down arrow keys?

Posted by Vivek Gite [Last updated: March 6, 2006]

SQL*Plus, the primary interface to the Oracle Database server, provides a powerful yet easy-to-use environment for querying, defining, and controlling data. However, it does not support up and down arrow keys for command-line editing and history.

You need to use gqlplus is a drop-in replacement for sqlplus, an Oracle SQL client, for UNIX/Linux and UNIX-like platforms.

As you know if you have used sqlplus, it is notoriously difficult to correct typing errors and other mistakes in your SQL statements. sqlplus does give you ability to use external editor to edit a statement, but only the last statement you typed. gqlplus solves this problem by providing the familiar command-line editing and history as in tcsh or bash shells, and table/column-name completion, while otherwise retaining compatibility with sqlplus. Thus, no user training is needed - simply use gqlplus instead of sqlplus. In addition, configuration/installation is trivial: gqlplus is a single binary compiled executable (written in C), so all you need to do is download it and put it anywhere in your PATH. After that, you'll be ready to use it.

You can download here

Then install it as follows:

$ tar -zxvf gqlplus*
$ ./configure
$ make
# make install

To connect to Oracle server use it as follows:

$ gqplus "user/password"

E-mail this to a friend      Printable version

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Anonymous Says:

    Using rlwrap in conjunction with SQL*Plus is another solution on Linux. There is some info at http://dizwell.com/main/content/view/53/85/

    Install rlwrap from your favorite rpm etc site and then alias sqlplus to use it:

    alias sqlplus=’rlwrap sqlplus’

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.