38

I am not a fan of using SQL*PLUS as an interface to Oracle. I usually use yasql, but it hasn't been updated since 2005 and can do with some improvements. A quick Google search shows yasql and SQLPal. I am using linux, so SQLPal is not an option.

Are there any alternatives out there, or am I stuck with an interface that I do not like or one that is no longer maintained?

2
  • sqlplus is CLI, see my comment bellow
    – vesperto
    Feb 1, 2018 at 16:53
  • Please, check out dbForge Studio for Oracle, a powerful GUI tool for Oracle management, administration, and development, it works perfectly under Windows and provides a free 30-day trial as well as a free Express edition.
    – Devart
    Aug 23, 2018 at 6:50

17 Answers 17

27

I presume that you want a low-overhead method of knocking out queries, but want more functions than SQL*Plus provides? Why not use Oracle's SQL Developer? It's free.

Install, make a new connection to your database, then just start typing a script. Press F5 to run it (or just the part of the script that you've highlighted).

1
  • 1
    I'm a little late on this, but as mentioned in the comments of the answer with the second most upvotes (Dan Vinton) there is rlwrap. rlwrap gives any application command line history with Ctrl-R (reverse-i-search). Then there is also SQLcl oracle.com/database/technologies/appdev/sqlcl.html . With SQLcl you don't need an SQL-net/SQL-home installation.... Watch the video. It has auto-completion, in place editing the buffer, and smart formatting.
    – hetOrakel
    May 19, 2020 at 13:47
13

Take a look at gqlplus. It wraps sql*plus on linux and makes it more user-friendly by adding things like command history, table name completion and so on.

2
  • 1
    This is indeed a very nice and handy tool. Now sqlplus just needs to be as smart about column sizes as mysql by default... Aug 8, 2011 at 14:00
  • 3
    I prefer using rlwrap around SQL*Plus to have command history and decent editing. Dec 8, 2011 at 16:16
10

Emacs can provide so much more powerful text editing features and functionality beyond the default SQL*Plus command-line interface.

Here are a few links on how to use Emacs as a wrapper for SQL*Plus:

9

TOAD is pretty expensive, but you can download a 90-day trial from the Quest site to see if it's got the feature set you want (don't be fooled by the "freeware" title - it's only free for 90 days, and then it expires, which definitely makes it shareware):

http://www.toadworld.com/Freeware/ToadforOracleFreeware/tabid/558/Default.aspx

Another options is a tool I've seen on CodeProject:

http://www.codeproject.com/KB/database/OQuery.aspx

It's in .NET, so you'd have to see if it compiled on Mono, but it might be worth a shot. I haven't used either tool (Toad or this one), since I'm a SQL Server guy, but I've heard good things about Toad.

3
  • +1 for TOAD, which is the better than Oracle's SQL Developer, but there's not a free version. The one you link to is a 60-day trial. quest.com/toad-for-oracle is the actual product page.
    – BQ.
    Jan 13, 2009 at 21:40
  • Hmm - you're right, that's not freeware at all, even though they call it that about a dozen times on the Quest site. I've updated the post.
    – SqlRyan
    Jun 25, 2011 at 5:11
  • TOAD used to be freeware, then Quest bought it from the author and productized it.
    – Gaius
    Nov 8, 2011 at 10:17
8

If it's command-line you want, I'd recommend rlwrap to go with sqlplus; it gives you line-editing capabilities and command history, making sqlplus a somewhat usable tool.

1
  • rlwrap (your link appears broken) suggests socat. I suggest socat READLINE,history=$HOME/.sqlplus_history EXEC:'sqlplus64\ USER\/PASS@HOST\:PORT\/SID',pty,setsid,ctty
    – vesperto
    Feb 1, 2018 at 16:51
7

You could try PL/SQL developer from allroundautomations, there is a trial available and the price is much lower than TOAD.

Regards K

7

Take a look at Senora. This tool is written in Perl and therefore is cross platform. Also Senora is free, extensible and intends to be your primary Oracle shell. You can extend Senora easily by providing you own plugins. Senora attempts to provide a friendlier output formatting than sqlplus. Columns tend to be only as wide a really needed.

Another interesting alternative is SQLcl. It provides in-line editing, statement completion, command recall, DBA stuff (e.g. startup, shutdown) and also supporting your previously written SQL*Plus scripts.

1
  • SQLcl seems to be provided with SQL Developer. On windows it is oddly named sql.exe. I like it because you can do easier output in CSV, XML etc.. but I am unsure how much Oracle is committed to this tool, if it is really supported etc...
    – phil_w
    Nov 1, 2022 at 19:27
4

It depends what you are looking for. If it is a GUI query tool, then Oracle have their free SQL Developer product (though it has a hefty footprint). There's a few free cross-database ones too. I like SQUirrel SQL client myself. There's also DBVisualiser and a few others. JEdit is an editor that has a DBConsole plugin for running database queries and DML/DDL. They are all java based so run most places.

If you like a command line, check out sqlpython (the developer has identified a couple of others too)

3

I like SQL Developer. It's free, has an intuitive UI, and runs on Windows, Mac, and Linux. It also supports many sql*plus commands and supports version control

3

Apparently Oracle itself has phased out sql*plus and replaced it with SQLcl, which supports more modern features such as history, formatting, etc: https://www.oracle.com/database/technologies/appdev/sqlcl.html.

1
  • Thank you, it's a drop-in replacement to sqlplus May 4, 2022 at 6:54
2

open source version of TOAD is TORA: tora.sourceforge.net

2

If you're the VIM type kind of guy then I'd look into Vorax. It is basically a VIM wrapper around SQL*plus.

0
1

Have used both Toad & SQL Navigator, and I love the stability SQL Navigator has.

1

i like sqlsh

alias sqr='sqlsh -d DBI:Oracle:MYSERVER.COM -u USER -p PASSWORD'
1

toad from quest software if you can pay for a license

sql squirrel if you can't.

0

I used my own tool ocimlsh in conjunction with rlwrap.

0

I just use socat to add readline support to sqlplus. History and a working backspace key actually turn sqlplus into a pretty decent tool.

In my .bashrc:

function sqlplus {
        socat READLINE,history=$HOME/.sqlplus_history EXEC:"$ORACLE_HOME/bin/sqlplus $(echo $@ | sed 's/\([\:]\)/\\\1/g')",pty,setsid,ctty
        status=$?
}

You might see alternatives that alias sqlplus to socat, but you will quickly discover that doing so prevents you from invoking sqlplus with its various command line options.

CAVEAT: Be sure to set $HOME/.sqlplus_history permissions to 0600. Passwords that you type end up in the history file. You might also consider adding cat /dev/null > $HOME/.sqlplus_history to your .bash_logout.

Not the answer you're looking for? Browse other questions tagged or ask your own question.