Database Administration   «Prev  Next»

Download Course Project - Exercise

Download Files

Objective: Download the course project files and the SQL script that will be used for optional On Your Own exercises.

Exercise Scoring

This exercise is not scored. When you have completed the exercise, click the Submit button below.

Exercise Instructions

Follow these steps to complete the exercise:
  1. Click the petstore.sql link below.
    petstore.sql
  2. Your browser will ask you what you want to do with the file. Choose to save it to disk.
  3. Save the zip file to your local machine.
  4. Specify that the file be saved in the C:\DBAdministration folder.
  5. Unzip the file using compression/decompression software such as 7-zip.
    Acquire 7-zip
    Extract all the files into the current directory.

If you do not have an Oracle database to use during the course, skip the rest of these steps.
Otherwise, continue with these steps to install the course project on your database.
  1. Open the petstore.sql file in a text editor.
    A few lines into the script is the following line:

CONNECT PETSTORE/GREATPETS;

This line works only if you run Oracle on your own computer. If you are running on a networked database, modify the line to include your database server name. For example, if your database server were named FRANCE, you would modify the line to say:

CONNECT PETSTORE/GREATPETS@FRANCE;

  1. Save the file with the change, keeping the same name for the file.
  2. Get to a command prompt and change directories to the directory where you stored your file.

  1. If you are running on Windows, select
    Start>>Programs>>MS DOS Prompt.
  2. On UNIX, start a terminal window if needed. The command for changing to a directory in Windows and UNIX is:

Cd directoryname 
Be sure to type the full path of the directory where you stored your file.
  1. You must log in as a valid Oracle Database Administrator (DBA). The default user name and password of the Oracle DBA are SYSTEM and MANAGER , respectively. If you are using a database on your local computer, you can leave out the @server portion. Type this command at the operating system prompt:

Sqlplus username/password@server

This starts up SQL*Plus. You will see a prompt that looks like this:
SQL>

  1. Execute the complete script by typing the following line and then pressing Enter:

start petstore.sql

  1. When the script is done, you will automatically return to your operating system prompt. Exit the operating system window (not always needed in UNIX) by typing EXIT and pressing Enter.
    You now have installed the PETSTORE user in your Oracle database along with the user's data.

For the purposes of this course, we will assume that you have placed your course downloads in a directory called
  1. C:\admin or
  2. D:\admin
on your C drive. Whichever drive you prefer to work from or whichever drive is available.
C:\admin
If you have Windows or choose to place the course downloads elsewhere, make a note of the folder name so that you can find it later.