Databases (HT2014)

Oracle SQL Developer

You can work with the Oracle database management system using Oracle SQL Developer. Extensive documentation for this program is available online:

1. Getting started with SQL Developer

1.1 Running Oracle SQL Developer at Chalmers

Oracle SQL Developer is avalable on the Linux systems at Chalmers. To run this program from a terminal window, type:

sqldeveloper

1.2 Running Oracle SQL Developer at Chalmers for the first time

The first time the program is run you will see this message:

Confirm Import Preferences

Figure 1. Confirm Import Preferences

Select "No".

Next you will see this message:

Oracle Uasge Tracking

Figure 2. Oracle Uasge Tracking

I chose not to allow this.

SQL Developer creates some files in $HOME/.sqldeveloper and if those files are present then you won't see these message windows when SQL Developer is run again. If you remove $HOME/.sqldeveloper and its contents then these message windows be shown again the next time you run SQL Developer, and $HOME/.sqldeveloper will be created again.

1.3 Creating a new connection

To create a new database connection, click on "Connections" in the connections navigator (Figure 3), then click on the green "+" symbol.

Connections navigator

Figure 3. Connections navigator

Enter the connection information in the database connection dialog box as shown in Figure 4. You should also give your Oracle username and password. Then click on "Connect".

Database connection dialog box

Figure 4. Database connection dialog box

1.4 Running Oracle SQL Developer on your own computer

While it is sufficient to work with SQL Developer on the Linux systems at Chalmers, you might find it convenient to install it on your own computer so that you can work on your assignments elsewhere. For information on how to do this, see the Oracle documentation on Installing Oracle SQL Developer.

Note: The Oracle username and password issued via the Fire system is only for connecting to the Oracle server at Chalmers; do not use that username and password anywhere else! In particular, to download SQL Developer from the Oracle web site you might need to register at that site and use a different username and password to access download the software. (added 2014-11-26)

1.5 Running Oracle SQL Developer off-campus

Several people have used SQL Developer to connect to the Oracle server from home via VPN (Virtual Private Network). (added 2014-12-11)

2. Using SQL Developer

If SQL Developer is not already running, you can start it from a terminal window by typing:

sqldeveloper

To connect to the Oracle database, select (e.g. by double-clicking) "Oracle" in the Connections navigator on the left side of the SQL Developer window. This will bring up a dialog box where you can give your Oracle username and password. When this information is entered, a worksheet is opened in the Oracle tab of the main SQL Developer window.

Worksheet

Figure 5. Worksheet

You can type SQL statements into the worksheet (hint: it's often more convenient to type these into a text file, then copy-and-paste them into the worksheet).

To execute an SQL statement, click on the "Run" symbol (green arrow) just above the worksheet. The results of executing the statement will be shown in panel below the worksheet. To execute several statements in the worksheet, click on the "Run Script" symbol to the right of the "Run" symbol.


Last Modified: 11 December 2014 by Graham Kemp