Database Course Help Page

CONTENTS:

[UsingUsing Oracle

To use oracle do the following :

  1. Append this example .cshrc file to your .cshrc file.
    It defines paths etc. and also gives some aliases to be used with oracle. As mentioned in class, "oradoc" can be used to look at all manuals except for the oracle book manuals - look at the aliases to see how to look at the oracle book manuals.
  2. Copy this example prefs.ora file to your home directory. This file is needed in order for "oradoc" to work properly.
  3. logout and login again
Now you can use "oradoc" to look at the manuals. Type "sqlplus /" (as explained in class) to access the database.

[Note:]Note: You can also access the Oracle manuals from this page

Try out the program called "oerr", to get explanations for Oracle error messages

[SettingSetting up the example library database

[Pro*C]Pro*C

[Back]Page Top

[SqlplusSqlplus Mode for Emacs

The documentation is in /cs/course/db/mode/sql-mode.doc If you want to use it, do this:

1. add this line in your .emacs file:

(setq load-path (append load-path (list "/cs/course/db/mode")))

2. run "emacs -l sql-mode.el -f sqlplus".

If you load emacs using the sqlplus mode, you may send the buffer to SQL*PLUS by enterring the command 'sql-send-buffer'. Or in more detail: type Alt-x, and then "sql-send-buffer" (without the quotes). This loads SQL*PLUS into another buffer, and runs there the current file.

SQL*Plus Bug

Writing comments such as :

/*this is a bad comment */

without a space after the "/*" may cause errors - it may cause SQL*Plus to repeat the execution of a previous command etc.
Always include a space :

/* this is a better comment */

Command Line Help from SQL*PLUS

If you feel uncomfortable with 'oradoc' or just don't want to load it, there is a simple and primitive way getting partial help from SQL*PLUS.
Just type 'help ', and, if you're lucky, you'll get the information. Try:
help condition
help constraint
help create table

SQL chapter is available in the library:

There are copies of the SQL chapter of "Database, Principles Programming Performance" by O'Neil in the library. Most of the copies are for reserve loan. This is the recommended text for SQL - DML for the course.

[Back]Page Top

[UsingUsing Oracle Books,Forms thru netscape

To view oracle files on the web, add the following lines to the file ~/.mailcap (An example .mailcap file can be found here):

application/oraclebd; /usr/local/oracle/bin/b10runm %s
application/oraclemx; /usr/local/oracle/bin/f40runm %s
application/oraclemb; /usr/local/oracle/bin/f40desm %s

Run your netscapes from a machine that runs these viewers correctly (you must restart netscape after changing the mailcap file).

[Back]Page Top

[StudentsStudents who take the IP course

Those of you who take (or took) the IP course probably have, defined in your environment (in file .khoros_env):

'setenv LD_LIBRARY_PATH /usr/local/X11R5/lib'

This line can cause problems, especialy for those who take the db course, because it redefines LD_LIBRARY_PATH and deletes its previous definitions.

The line should be replaced by:

if ( $?LD_LIBRARY_PATH ) then
setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH":"/usr/local/X11R5/lib"
else
setenv LD_LIBRARY_PATH /usr/local/X11R5/lib
endif

[HowHow to Report Oracle Errors

Whenever you encounter an oracle error, which you think is caused by some problem with the database (and your sure there isn't a problem with your program) ,please report the error (post it in local.course.db).
In your report include the oracle error code, an explanation of when the error occurs, and if relevant please include a small program isolating the error ...
By following the above description you will help us fix the problem as soon as possible.

[Back]Page Top

db@cs.huji.ac.il

[Back]Back to Database course Home Page