Install Oracle DBMS Software

It might sound trivial, but installing a commercial DBMS software is actually a valuable experience that job interviewers do appreciate!

You will need to use a DBMS to try out the SQL commands and queries when we start learning the SQL query language and when you work on the SQL homework assignment. While SQL is a standard, every vendor implements it with some quirks. For this course, we standardize on the free Oracle DBMS Express edition.

It is best to install the software NOW during the first week of the semester when you have less homework and more free time.

If you laptop’s OS is Windows

  1. Go to the Oracle DBMS Download Page.

  2. Download and install the win32/win64 version using the installation instructions for windows.

If your laptop’s OS is Linux (Oracle linux, Red Hat,SUSE, CentOS)

  1. Check the installation instructions for linux to see if the version is compatible with Oracle.

  2. If it is compatible, go to the Oracle DBMS Download Page., download and install the linux version using the same installation instructions.

If your laptop’s OS is Mac OSX or non-compatible unices:

  1. Download & install VirtualBox

  2. Download the iso image for CentOS Linux version 7.1 using the link http://mirror.ancl.hawaii.edu/linux/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso

  3. Create a new VM in VirtualBox. Ensure that
    • RAM > 3GB
    • HDD size > 12GB.
  4. Start the VM using the CentOS Linux ISO image. Follow installation instructions in the screencast below.
    • Make sure that you configure > 2048 MB of swap space!
    • When you create the user account, make sure that you check the box to make the user an administrator.
    • If all is successul, you might want to clone your VM.
  5. Login using the username and password that you configured.

  6. Open the Firefox browser and download the linux 64 bit version of Oracle 11g XE You might have to click on the network icon on the top right to turn networking when you login for the first time.

  7. Follow the installation instructions for linux. Remember to add the oracle_env.sh script into your bash profile.
    • echo './u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >> ~/.bashrcx
    • source ~/.bashrc
    • If all is successul, you might want to clone your VM.

Test if your installation works.

Start the command line shell as the system admin using the command:

sqlplus sys as sysdba

Enter the password that you gave while configuring Oracle earlier. You will now be placed in a SQL environment that only understands SQL commands.

Create a regular user account in Oracle using the SQL command:

create user USERNAME identified by PASSWORD;

Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password. If you had error executing the above with a message about resetlogs, then execute the following SQL command and try again:

alter database open resetlogs

Grant privileges to the user account using the SQL command:

grant connect, resource to USERNAME;

Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password.

Exit the sys admin shell using the SQL command:

exit;

Start the commandline shell as a regular user using the command:

sqlplus

You will be prompted for a username and password. Once authenticated, you will be able to type in the standard SQL commands learned in class.

CREATE TABLE prod(id int, name char(40));
INSERT INTO prod VALUES (1, 'apple');
SELECT * FROM prod;

Screencast for Installing CentOS 7.1 in VirtualBox VM

Screencast for Installing Oracle 11g XE in CentOS in VirtualBox VM