GQLPlus – Command Line Goodness

Share Button

I just found a link to a command line wrapper for SQL*Plus called GQLPlus. Supposedly this wrapper allows historical editing, table/column name completion, and more.

Even better, it’s just a precompiled drop-in with SQL Plus. Download and run; nothing else is required. From the website:

“gqlplus is a drop-in replacement for sqlplus, an Oracle SQL client, for UNIX and UNIX-like platforms. The difference between gqlplus and sqlplus is command-line editing and history, plus table-name and column-name completion. 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.”

I haven’t used it yet, but it looks really cool. Anyone out there who has given it a shot?

Share Button

4 comments

  1. Not sure if the latest release works with 10g. It crashes quite often, for example if your database is mounted not open, or you do not have enough permission (let’s say no permission on all_tab_columns), so it is not stable enough to be used on a production site, but it is still very fun.

    I switched to rlwrap a long time ago, but rlwrap has no table completion. Well, table completion almost never worked 😯

  2. It does sound cool, but I haven’t been able to get it to work on Linux with Oracle 10.2.0.3. It just hangs upon connecting and never gets to the SQL prompt. I compiled the source and tried again, but same result. I would say it’s not ready for prime-time and probably never will be. Try rlwrap instead.

  3. Simon, you can read in README: “gqlplus hangs if glogin.sql and/or login.sql files contain the `pause’ or `set pause on’ statements.”
    If you haven’t tried it, try to erase ‘set pause on’ from these files. It works. You can set ‘pause on’ later in prompt.

  4. gqlplus hangs at connected if anything in your ~/.sqlplus/login.sql attempts to alter the sqlplus prompt. Including SET SQLPROMPT.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.