Oracle SQL Developer is a free SQL development environment from Oracle. It provides a graphical tool to interact with your database. Furthermore, it is a complete standalone application thus neither SQL*Plus or Oracle Database Client software need to be installed beforehand in order to use it.
It does however, require that the Sun Java 6 JDK be installed on your system. Install it by typing:
sudo apt-get install sun-java6-jdk
Note:
You may also use OpenJDK
To obtain the installable package, navigate to Oracle’s SQL Developer download page at:
http://www.oracle.com/technology/software/products/sql/index.html
You must agree to the OTN License Agreement for SQL Developer in order to download the software. Once doing so, choose the Accept License Agreement radio button.
Scroll down and select the package entitled ‘Oracle SQL Developer RPM for Linux’ to download the package.
Note:
If you do not have an account with the Oracle Technology Network, go ahead and create one. It’s free and also required in order to download the package.
Next we will convert the .rpm to a .deb to install it in Ubuntu. We’ll do this by using an application called ‘alien’. Install it by typing:
sudo apt-get install alien
Next, navigate to where you saved the SQL Developer .rpm package and type:
sudo alien -k –scripts sqldeveloper*.rpm
This will create a .deb package ready to be installed into our system. We do so by typing:
sudo dpkg -i sqldeveloper*.deb
Oracle SQL Developer is now installed. However, in order to run it, we need to point it to the JDK. Failure to do so, will result in the following message when trying to run Oracle SQL Developer:
Oracle SQL Developer
Copyright (c) 2008, Oracle. All rights reserved.
Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
Looking at the message we can see that it’s trying to obtain the JDK path by reading a file called ‘jdk’ in a directory called ‘~/.sqldeveloper’. Let’s resolve this dependency.
First we’ll create the missing directory by typing:
mkdir -p ~/.sqldeveloper
Next we’ll create an empty jdk file by typing:
touch ~/.sqldeveloper/jdk
Edit this file and input the path to the JDK by typing:
gedit ~/.sqldeveloper/jdk
and pasting into it:
/usr/lib/jvm/java-6-sun
You may now run Oracle SQL Developer by typing:
sqldeveloper
Or by going to:
Applications > Programming > SQL Developer
You may also go ahead and delete the .rpm downloaded and subsequent .deb that was created.
Tags: Oracle, SQL, Ubuntu