Setting Up Oracle
Before you can use Oracle you must set up an account. To do this
follow the instructions on the
TSG web page , which, in summary, is:
- Log in to one of the School's Unix servers (Tuck, Robin, etc.)
- Add oracle to your list of packages. To do this
- This assumes that you use bash, which most students are
set up to do. If you use csh or some other shell please
follow the instructions on the TSG
- Go to your home directory if you are not already there. You can
do this with the command
- Edit the file .profile with your favourite Unix text
editor. For example, to edit it with emacs use
- If your .profile has a line that starts
then add oracle to your list of packages. For example, if
your packages line read
you would change it to
PACKAGES="x11 pbm oracle"
Note that you are looking for a line that starts
"PACKAGES=...", not "# PACKAGES=...". The first is
a line that defines your packages, the second is a comment that
gives you an example of how to define your packages. Lines starting
with "#" are comments and are ignored.
- If your .profile does not have a packages line already then add
at the start of the file (or just after the comment lines which
start with #)
- Save the file and exit your editor
- Refresh your settings either by logging out then back in again,
or by using the command
- At the command prompt type
You will be given a password when you do this. Remember this
password, you will need it very soon.
- You can now start Oracle's SQL interface using the command
- Once you have started sqlplus you can change the password
to something more memorable using the command
and following the online instructions.
- You can now enter SQL commands, which must end with a
semicolon, or to exit sqlplus type
and press return.
If when you type sqlplus you get a message that the command cannot be
This usually means that you have not set up your packages correctly in
your .profile, as described above. If you type
in bash you should get a long string including the text
If this is not in your path then the system doesn't know where to
look for sqlplus. Check that
If this doesn't help, then come along to the lab times for assistance.
- You have edited your .profile as described above
- You haven't just edited the comment that gives you an example of
a PACKAGES set up (the line starting with "#", see Step 2.4 for details).
- Your path isn't being redefined later in your .profile - look for
lines which look like
If such a line exists and doesn't inlcude $PATH in it, then
it will overwrite the old path.
- Your settings have been refreshed. To make sure of this log out
of Unix completely then log back in.