Showing posts with label SQL Develooper. Show all posts
Showing posts with label SQL Develooper. Show all posts

Install SQL Developer 3.0 on Ubuntu 10.04

Ok, so I needed to perform some tests of Oracle's SQL Developer 3.0 runing on Ubuntu, so I decided to install it on a machine running Lucid Lynx 10.4. These are the steps I followed (following the guidelines that mick has posted.)

Requirement: Ensure you have a JDK installed
SQL Developer requires that the Sun Java J2SE JDK 1.6.11 or later be installed on the system. To install JDK, use the command:
$ sudo apt-get install sun-java6-jdk

Here you may receive the error message below:
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate

To solve this problem, add a new source to the aptitude repository, then try installing again:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

Download the files below
(a) Download the software
You will need to log in the OTN site and go to the address below and download the file titled “Oracle SQL Developer for other platforms.”

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

(b) Install the make-sqldeveloper-package package
$ sudo apt-get install sqldeveloper-package
sqldeveloper-package
builds a .deb package
// builds a Debian package of Oracle SQL Developer from the architecture independent archive from , identified as "Oracle SQL Developer for other platforms."

// you can check the contents of a package with

$ dpkg -L

To download the sqldeveloper-package you will need Ubuntu’s multiverse software repository.





(c) Install the tofrodos package
$ sudo apt-get install tofrodos

// Create symbolic links to the tofrodos commands to 
// allow the sqldeveloper-package to work:
$ sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix
$ sudo ln -s /usr/bin/todos /usr/bin/unix2dos
tofrodos package
Converts DOS <-> Unix text files
// DOS text files have CR/LF pairs as their new line delimiters while Unix text files have LFs (line feeds) only
// Tofrodos comprises one program, "fromdos" alias "todos", which converts text files to and from these formats. Use "fromdos" to convert DOS text files to the Unix format, and "todos" to convert Unix text files to the DOS format.










Convert the ZIP file to .DEB package
To convert the .zip file to a .deb package, use the command below::

The make-sqldeveloper-package command will
(1) create a temporary directory at the location indicated by (i.e. /tmp/build)
(2) use the temporary directory to build the .deb package
(3) write the new package in the directory
(4) remove the temporary directory

So, if you saved the .zip file in the current directory, you could issue the command:



Install SQL Developer
To install, run:

$ sudo dpkg -i sqldeveloper_3.0.04.34+0.2.3-1_all.deb

This should install Oracle SQL Developer and you'll end up with a new entry in Gnome's menu:
Applications->Programming->SQL Developer








Inform the location of JDK
When you run SQL Developer for the first time, you may receive the message below on a terminal window, if it cannot find the location of JDK (SQL Developer expects to find the path information in the file ~/.sqldeveloper/jdk):
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

To fix this, you need to (a) create the directory .sqldeveloper; (b) create the jdk file and type in the path to the JDK:
$ mkdir -p ~/.sqldeveloper
$ vi ~/.sqldeveloper/jdk
# enter the path to JDK: /usr/lib/jvm/java-6-sun

Now you should be able to use SQL Developer 3.0