Important! See new instructions in red and yellow at the bottom of this page!

CSCI 276 and Other Oracle Students - How to get Oracle working in OCNL 241:

 

Note: literal values for you to type are listed in quotation marks below.

 

Setting up your Display for Oracle Java tools -

1) Check to see what your hostname is by typing "hostname" and hitting the enter key.

2) Similarly, you can find out your machines IP address by typing "ifconfig -a" and hitting the enter key.

3) Suppose your machine is gunsmoke.  You need to set up your display environment variable to reflect this, you type ( > is the Unix prompt)

> DISPLAY="gunsmoke:0"

>export DISPLAY

>xhost +gunsmoke

 

Now, the Oracle Java tools should be able to display properly.  You can also put these lines in your .profile if you will always be sitting at the same machine.

 

Editing your .profile, executing it and getting Oracle running -

 

1) Login to your machine with your Unix login.

2) In the Common Desktop environment, get a terminal window by clicking on the up arrow above the cpu icon.  Choose a host terminal window.

3) Edit your .profile

Make sure you are in your home directory.  You can do this by typing "cd" at the Unix system prompt.  To open your .profile for editing with the vi editor, type "vi .profile".  Now, add the following lines to the end of your .profile -


ORACLE_HOME=/opt/Oracle8i/products/8.1.7

ORACLE_BASE=/opt/Oracle8i

ORACLE_SID=sqldb (** Note: sqldb is for the CSCI 276 students, if you are taking a different Oracle class be sure to find out the appropriate SIDs from your TA/instructor**)

PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME ORACLE_BASE ORACLE_SID PATH

 

Save the changes to your .profile by typing "<shift>:wq" in vi.

 

4) Execute your .profile by typing ". ./.profile".  There is a space between the first two dots here.

5) Execute sqlplus by typing in "sqlplus" at the Unix prompt.

6) Give the user name of internal.  No password is necessary.

7) Start the database by typing "startup" at the SQL prompt.

8) For 276 students only: Connect to the database as the appropriate user, be that ora1 or ora2.  E.g., if I am ora1 I would type "connect ora1/oracle" at the SQL prompt.

9) For 276 students only:You are all set up to work with the sqldb database in your schema now. 

 

VERY IMPORTANT!!

 

Always follow the procedure below as you regularly use your sqldb database in lab sessions throughout the duration of the course:

  1. login with your Unix account

  2. set your ORACLE_SID to sqldb (or other for your Oracle class) as described above

  3. type sqlplus at the Unix prompt

  4. when asked for a login, type "internal" (no quotes, I'm just using them to illustrate a literal value)

  5. once you are in sqlplus type 'startup", and wait for your database to start up and open

  6. now type "connect ora1/oracle" or whatever your login and password are for this class

  7. once you are done working in a lab session, you will need to shut down your database.  At the sqlplus prompt, now type "connect internal", then type "shutdown immediate" and wait for your database to shut down.

  8. exit out of sqlplus

  9. exit out of your Unix account