Skip to content

Instantly share code, notes, and snippets.

@isaacarnault
Last active September 23, 2023 05:54
Show Gist options
  • Save isaacarnault/3fcd6017b77853617344d61b860aceb6 to your computer and use it in GitHub Desktop.
Save isaacarnault/3fcd6017b77853617344d61b860aceb6 to your computer and use it in GitHub Desktop.
Installing Oracle SQL developer on Linux
________ ________ ___ __ ___
|\_____ \|\ __ \|\ \|\ \ |\ \
\|___/ /\ \ \|\ \ \ \/ /|\ \ \
/ / /\ \ __ \ \ ___ \ \ \
/ /_/__\ \ \ \ \ \ \\ \ \ \ \
|\________\ \__\ \__\ \__\\ \__\ \__\
\|_______|\|__|\|__|\|__| \|__|\|__|
SQL workbench. Use Oracle SQL Developer instead.
PL/SQL. Gist uses basic SQL syntax.

1-BFTWWQO8gd-Rb6ah-N0-Gdbp-A.png

Starting with Oracle DB on AWS and Oracle SQL developer remotely

Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.

What you need to complete this installation

This gist was made on a Ubuntu 18.04 LTS.

A. Default OpenJDK - installed on your local machine

B. Oracle SQL Developer - Linux RPM installed on your local machine

C. Oracle DB instance hosted on AWS using RDS

D. Remote connection to your DB using Oracle SQL Developer


A. Install the Default OpenJDK

$ sudo apt-get update
$ sudo apt install default-jdk
$ java -version
🔴 See command

java.png


B. Install Oracle SQL Developer - Linux RPM

Go to https://www.oracle.com/database/technologies/appdev/sql-developer.html > download

To Linux RPM click on Download.

🔴 See command

linux-rpm.png

Open your Terminal, create a folder oracleSQL and move the "sqldeveloper-19.2.1.247.2212.noarch.rpm" file you've downloaded in that folder.

🔴 See command

RPM.png

Install Alien

Alien converts an RPM package file into a Debian package file or Alien can install an RPM file directly.

Open a new Terminal window, and use as follows:

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install alien

Go to your oracleSQL folder, and use as follows:

sudo alien <name_of_package>.rpm (e.g: I'm using sqldeveloper-19.2.1.247.2212.noarch.rpm).

Once command completed...

$ ls
$ sudo dpkg -i <name_of_package>.deb

Your directory should now look like this ...

🔴 See executable

config.png

The executable should be located in the opt/sqldeveloper ...

🔴 See command

executable.png

Launch Oracle SQL Developer

$ ./sqldeveloper.sh

C. Connect to a database remotely

If you have an AWS, Azure or GCP account, you can connect to your database using Oracle SQL Developer.

I'm here using an Oracle RDS instance on my AWS account.

3. Create an Oracle DB instance hosted on AWS with RDS

On your AWS Management Console, go to Services > RDS.

Go to Databases > Create database > Choose Standard create > Configuration: Oracle as engine type

🔴 See configuration

standard-create.png

Edition: choose Oracle Standard Edition Two
Version: select Oracle 12.1.0.2.v2

Templates: choose Dev/Test

DB instance identifier: ORCL-DB-Test

Master username: choose a username

Master password: choose a password

🔴 See configuration

DBidentifier.png

DB instance size: choose Burstable classes > select db.t3.micro

DB instance size: select Burstable classes (includes t classes) > db.t3.small

Storage > Allocated storage: 20 GiB

Disable "storage Auto Scaling"

🔴 See configuration

DBinstance-Size.png

Connectivity: set Publicaly accessible to Yes

🔴 See configuration

connectivity.png

Then Create database. When your DB is up and running...

dbrunning.png

4. Connect and provision your DB remotely using Oracle SQL DB

Go back to Oracle SQL Developer locally and connect to your DB credentials.

On Connections click on the "plus" button.

Connect with the information provided upon the DB creation on RDS.

Selection-056.png

Here you go! You are now connected to your Oracle DB remotely using Oracle SQL Developer.

In your left panel, you are connected to a database. Now you can create tables and start interracting with your DB.

Basic SQL syntax

We are here using basic SQL syntax to show how our DB works.

CREATE TABLE students 
  ( 
     contact_id     NUMBER(10) NOT NULL, 
     last_name      VARCHAR2(50) NOT NULL, 
     first_name     VARCHAR2(50) NOT NULL, 
     address        VARCHAR2(50), 
     city           VARCHAR2(50), 
     uni_assignment VARCHAR2(50), 
     CONSTRAINT students_pk PRIMARY KEY (contact_id) 
  ); 

isaac-arnault-oracle.png

You can create and provision tables in Oracle DB using PL/SQL syntax for more advanced needs.

If you enjoyed this gist, feel free to fork and share it! Thanks.

Author

  • Isaac Arnault - Start with Oracle SQL Developer on Linux.
MIT License
Copyright (c) 2019 Isaac Arnault
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@dalaiRama06
Copy link

Really helped me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment