Wow, I can’t believe I’ve not considered this before! SQLPlus is a great tool, I use it all the time as it’s great for doing little bits and pieces where you don’t need the tools in SQL Developer (which is my preferred client for most big stuff) or you don’t want to go to the trouble of starting up a GUI. My major gripe with it has always been it’s almost complete lack of a command line history feature which is astounding considering how long that kind of feature has been available for other shells (bash, psql, mysql, even the Windows Command Prompt since XP).
Anyway there is a workaround to ‘add’ the feature! You’ll need to install the ‘rlwrap’ package which is a
…wrapper that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is kept between invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line.
You can get that from Sourceforge or in my case I found it in the Ubuntu Universe repository (there’s rpm’s on Sourceforge) so I just did:
$ sudo apt-get install rlwrap
You can call SQLPlus from rlwrap like this:
$ rlwrap sqlplus user@database
or to make things simpler use alias:
$ alias sqlplus='rlwrap sqlplus'
Like my earlier post on installing the Oracle 10g client on Ubuntu, when I came to install SQL Developer on 8.10 I couldn’t find a complete list of instructions so I thought I’d write my own.
First we need to get the rpm from Oracle:
Now we need a few things before we install it:
sudo apt-get install lsb sun-java6-jre alien
We’re ready now to build the .deb package and install:
sudo alien --scripts sqldeveloper.rpm
sudo dpkg -i sqldeveloper.deb
Finaly we need to tell SQL Developer where to find our JDK, mine went into /usr/lib/jvm/java-6-sun-126.96.36.199/ so:
echo "/usr/lib/jvm/java-6-sun-188.8.131.52/" > ~/.sqldeveloper/jdk
SQL Developer should now be installed in the Applications menu under Programing.
Hey, two posts in one day! Must be some kind of achievement (for me anyway).
I’ve recently installed this realy useful little Gnome panel applet called sshMenu. Once installed and set up it gives you direct access to all your ssh sessions from a menu on the Gnome panel. Here’s how to install it on Ubuntu 8.10 as that is my current distro:
sudo apt-get install sshmenu sshmenu-gnome
then just add the application to the Gnome panel by right-clicking the panel and choosing ‘Add to panel’ then select the sshMenu application from the list. I had to restart Gnome (CTRL-ALT-BACKSPACE) after the installation before it showed up in the add to panel list.