This tutorial assumes you already have an Oracle account.
Currently, Oracle runs on the machine delphi and
does not run in remote-client mode, which means:
As an Oracle user you will be able to create and delete relations.
You are welcome to try different commands. However, please don't
create gobs of data. The disk space allocated to all students
is limited. If you are using excessive space beyond
the course requirements, your account may be dropped.
Note: your Oracle password is different from your Unix password.
The rules
that apply to your system password apply to your Oracle password:
You are NOT to release this password to anyone else and should
be careful to safeguard your password.
Use this set of instructions
to learn how to set displays.
NOTE: for most Oracle work, you will not need to display windows
remotely. However, you will need to if you are running Forms
or Java.
Now you should be all set to begin working with Oracle.
If you are using tcsh, you need to edit the
.cshrc file as follows:
NOTE: This path stuff needs to be done only ONCE.
/usr/ccs/bin
/opt/SUNWspro/bin
/home/dba/app/oracle/product/7.3.2/bin
set $path (/usr/bin /usr/lang /usr/etc /usr/ucb)
What you need to do is simply add the paths above (there's no
problem in making the statement really long):
set $path (/usr/bin /usr/lang /usr/etc /usr/ccs/bin /opt/SUNWspro/bin /home/dba/app/oracle/product/7.3.2/bin)
setenv ORACLE_BASE /usr/delphi1/app/oracle
setenv ORACLE_HOME $ORACLE_BASE/product/7.3.2
setenv ORACLE_TERM sun5
setenv ORACLE_SID orc2
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:/usr/openwin/lib:/usr/dt/lib:.
NOTE: make sure you don't have an extra '/' by accident. For
example, the following simple mistake causes major problems:
setenv ORACLE_BASE /usr/delphi1/app/oracle/
% source .cshrc
at the Unix command line.
% setenv
You should see the changes reflected in the PATH variable, and
every time you login, you should have all such changes ready.
ulimit -n 128
export ORACLE_BASE=/usr/delphi1/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/7.3.2
export ORACLE_TERM=sun5
export ORACLE_SID=orc2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/openwin/lib:/usr/dt/lib
export PATH=.:$ORACLE_HOME/bin:/opt/bin:/bin:/usr/bin:/usr/ccs/bin:/opt/gnu/bin:/usr/local/bin:/opt/SUNWspro/bin:/usr/ucb:/usr/delphi1/oracle:/gwu:$PATH
ORAENV_ASK=NO
. /opt/bin/oraenv
% cd
% cp ~oracle/prefs.ora .
parrot% telnet delphi
(Forthcoming)
delphi% sqlplus
SQL>
SQL> select * from simha.accounts;
This selects all tuples from the table accounts owned by user simha.
Alternatively, you can place SQL statements (as many as you like)
in a file and indicate the file name. For example, suppose the
Unix file test.sql contains the line
select * from accounts;
Then
SQL> @test.sql
causes the statements to be executed. Type help to get help within
SQLPlus.
SQL>!ls
lists the current directory contents. You can do without this
feature, but it helps you avoid going in and out of SQLPlus.
delphi% ps -uax | more
Then look for Oracle processes that end in _osid. If you see at
least two, then Oracle is running.