Week 1
The instructions below are now deprecated!
To-Do
- Intro Discussion
- Lab 01 – Oracle SQL*Plus
- Oracle Exam 01
- Try #1
- Try #2
Summary
In week 1 you will be learning how to connect to your Oracle instance using SQL*Plus, the command line utility for Oracle Database. You will also run a script to initially set up the project for the course.
Lab Hints
To connect to the Oracle Instance in our pre-built Fedora Image, you just have to log in using SQL*Plus. SQL*Plus is the command-line program used by Oracle to manage the database. Within it, we can send commands and send SQL to the database. In return, it can give us data.
To login to the database using SQL*Plus:
- Open a Terminal
- Start the SQL*Plus program and login
-
sqlplus student/student
-
- You should see a SQL> prompt. You are now connected to the database!
For the lab you also need to run the create_oracle_store.sql script that is located in the ~/Data/cit225/oracle/lib directory. We can run scripts in SQL*Plus using the @filename command. So to run the script we can run the following command:
SQL> @~/Data/cit225/oracle/lib/create_oracle_store.sql
You should see the database being created very quickly. When it is finished you will see the SQL> prompt again. We can verify this worked by running the following SQL query:
SQL> SELECT table_name FROM user_tables WHERE table_name NOT IN ('EMP','DEPT') AND NOT table_name LIKE 'DEMO%' AND NOT table_name LIKE 'APEX%' ORDER BY table_name;
It should return a list of tables that are in your database. Take a screenshot and submit it.