Oracle is one of the most important relational database implemented both in big and small corporations. This is a beginner tutorial that will walk you through common debugging techniques and tips in Oracle using SQL Developer.
Tip: There are a lot of debugging tools that are available for Oracle but one of the simplest is the one developed by Oracle Corporation itself – the Oracle SQL developer. The good thing is that this tool is free to use. Below are the steps to install Oracle SQL Developer in Ubuntu:
1.) Go to Applications – Ubuntu Software Center. In the search box, type Oracle SQL Developer.
2.) You should see a package named “Oracle SQL Developer Debian package builder.” Go ahead and install it. Type your Linux root password to proceed. Wait until it is completely installed on your system.
3.)Go to this page: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html . And then select “Accept License Agreement”.
4.) Scroll down until you see “Oracle SQL Developer for other platforms”. Click that link. You will then be required to login to your Oracle account.
5.) After logging in, you can start to download the zip file. Download it to your Ubuntu Downloads folder. Oracle SQL developer is not only helpful for troubleshooting PL/SQL procedures but it is an IDE, which means you can use it for developing Oracle applications.
注:如果已经具有root权限,可不进行(6)
6.) After downloading the zip file (which is around 147MB), the default download path will be: /home/your_ubuntu_username/Downloads
You are now ready to install Oracle SQL developer. Login as root in the terminal:
codex-m@codex-m-desktop:~$ sudo -s -H
[sudo] password for codex-m:
7.) Install tofrodos package:
root@codex-m-desktop:/home/codex-m# sudo apt-get install tofrodos
8.) Create symbolic links:
root@codex-m-desktop:/home/codex-m# sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix
Then after that:
root@codex-m-desktop:/home/codex-m# sudo ln -s /usr/bin/todos /usr/bin/unix2dos
9.) The download file is a zip package (sqldeveloper-3.0.04.34-no-jre.zip) but the Ubuntu installer should be a Debian package. So convert the zip file to .deb:
root@codex-m-desktop:/home/codex-m# make-sqldeveloper-package -b /tmp/ORACLE/ /home/codex-m/Downloads/sqldeveloper-3.0.04.34-no-jre.zip
Note: It will create a temporary folder /tmp/ORACLE for the conversion process. Make sure the path to the downloaded zip file is correct. After pressing enter you will see:
make-sqldeveloper-package: Building sqldeveloper package in "/home/codex-m".
注:如果(9)出现错误,可以参考如下方式解决:
【wget https:/
/bugs.launchpad .net/ubuntu/ +source/ sqldeveloper- package/ +bug/985810/ +attachment/ 3101040/ +files/ sqldeveloper- magic.diff
sudo patch /usr/bin/make-sqldevelop er-package < ~/sqldeveloper- magic.diff
sudo apt-get install debhelper】
然后重新执行(9).
10.) Go to your home folder (e.g. /home/codex-m). Get the converted file name (e.g. sqldeveloper_3.0.04.34+0.2.3-1_all.deb). Finally execute the debian package and this will install the Oracle SQL developer:
root@codex-m-desktop:/home/codex-m# sudo dpkg -i sqldeveloper_3.0.04.34+0.2.3-1_all.deb
11.) In the command prompt as a root. Install Java OpenJDK (required):
root@codex-m-desktop:/home/codex-m# sudo apt-get install openjdk-6-jdk
12.) Locate the path of your newly installed openjdk package. By default you can find it in this path: /usr/lib/jvm/java-6-openjdk
Confirm if it is correct.
注:若你本机有其它jdk,12没必要关心。
13.) 在搜索中输入sql,找到sql Developer,运行即可。