To use oracle do the following :
To compile the example program from class :
Save it as filename.pc
Run the command :
filename
You can use the supplied makefile to compile your homework assignment as well.
Make sure to name your source code file as *.pc
Demo programs can be found in /cs/oracle/proc/demo.
Related manuals :
Programmers guide to the Oracle Precompilers
Pro*C supplement to the Oracle Precompilers Guide
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:
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.
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 */
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
help condition
help constraint
help create table
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.
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).
Those of you who take (or took) the IP course probably have, defined in your environment (in file .khoros_env):
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
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.