CISE Help & Resources

Oracle

Oracle Documentation

Note: to prevent copyright infringements, this documentation is only availble within the CISE network.

To read this outside of the CISE network, ssh into sand or rain and run

lynx http://www.cise.ufl.edu/help/database/oracle.shtml

or

w3m -F http://www.cise.ufl.edu/help/database/oracle.shtml

Registering for an Oracle Account (and Forgotten Passwords)

To sign up for a CISE Oracle account, or to set a new password for an existing Oracle account if you have forgotten your password, go to the Oracle Account Registration Page.

You will need to supply the following information on the registration page:

CISE Username
Enter your CISE username
CISE Password
Enter your CISE password
Oracle Password
Select a password for you oracle account and enter it here. The password must meet the following criteria:
  • The password must be 7 or 8 characters long (only the first 8 are used).
  • The password must contain at least one letter (this stops things such as special dates, SSN, phone numbers, etc. from being used).
  • At least 2 of the characters must be a special character or digit. At least 1 of these must be a special character (non-alphanumeric). The first character must not be a dash (-).
  • The password must not contain your username.
  • You should avoid starting with a single word and then doing common 1-character replacements such as replacing 'i' with 1 or 'a' with '\@'. Some of these will fail the good password check.
  • NOTE: Oracle passwords must not contain the following characters:
    / ( ) @ &
    

    These characters cause problems when logging into Oracle.

  • NOTE: Also, Oracle passwords may not begin with a single quote (') or double quote (")
Verify Oracle Password
Enter your oracle password again. It must match the first time.
Class
There are mulitple instances of Oracle being run. On this menu, select the instance that you are registering for (or resetting your password). More information on the instances available are included below.

Determining the Name of the Database Instance

Currently, there 2 Oracle database instances running in the CISE department, the 'orcl' and 'resdb' instances.

orcl
This is the Oracle 9i database instance used for most class and research projects beginning Spring 2003. This will be the instance most users will sign up for.

resdb
This is the Oracle 9i database instance used for database research only. Users should use this only when directed to do so by a professor. Users found using this database without authorization may have their access removed and data deleted without warning.

Using SQL*Plus on the Unix Command Line

In order to use the command line SQL*Plus utility, do the following:

% source /usr/local/etc/ora.csh
% sqlplus <username>@<instance>

Where <username> is replaced with your CISE username, and <instance> is the name of the database instance you are using. You will be prompted for your password once you run the sqlplus command.

For all Oracle 9i accounts, use:

source /usr/local/etc/ora.csh
sqlplus (username here)@orcl

Note that by sourcing that file, you are setting the $ORACLE_HOME environment variable in the shell, which gets used by all programs subsequently run in that shell.

Using Oracle from CGI Scripts

If you are running a program as a CGI script, you will not have a shell from which you can source the /usr/local/etc/ora.csh file. In this case, you will need to set the environment variable $ORACLE_HOME from within your program to the value

/usr/local/libexec/oracle-client

E.g., in perl, you would do the following:

$ENV{ORACLE_HOME} = '/usr/local/libexec/oracle-client';

Please see the appropriate documentation for any other language on how to set environment variables there.

Using Oracle From Windows, or From Outside CISE

If you're using an Oracle client and need to specify the paramters, use the following for Oracle 9i accounts:

Server : 	oracle1.cise.ufl.edu
SID    : 	orcl
Port   : 	1521

Using JDBC with Oracle

To use Oracle's JDBC on CISE Solaris machines, add the following to your CLASSPATH:

/usr/local/libexec/oracle-client/jdbc/lib/classes12.zip:.

You should then be able to use the Oracle java classes (oracle.sql.*, oracle.jdbc.*, etc) in your java programs.

A quick Java example using JDBC is available here. Additional examples and demos can be found in the JDBC demo directory at:

/usr/local/libexec/oracle-client/jdbc

PHP and Oracle DB Connections

php (/usr/local/bin/php) now supports Oracle. Please see the manual here. Oracle support is discussed here.

A quick PHP exmple using OCI8 is available here.

More info on PHP at CISE can be found at the CISE PHP page

Using Perl/DBI with Oracle

To use Oracle in Perl, use the DBD::Oracle module. Relevant documentation are in the man pages for DBI and DBD::Oracle.

A short Perl example using DBI is here.

Using Ruby/DBI with Oracle

For anyone interested in using the Ruby language, there's also support for Oracle in Ruby on CISE systems, using a DBI module modelled after the perl DBI scheme:

DBI.connect("dbi:Oracle:classdb", "username", "password" ) { |dbh|
   dbh.prepare("select * from mytable") { |sth|
      sth.execute(tablespace)
      sth.each { |row|
         p row
      }
   }
}

Using Embedded SQL and the Oracle Pro*C/C++ Compiler

For those using embedded SQL, the documentation can be found in the Oracle documentation

Demos and a sample Makefile can be found in

/usr/local/libexec/oracle-client/precomp/demo/proc

Info for Students

Info for Faculty & Staff

Industrial Advisory Board