Oracle is a relational database.
Currently Oracle is only available on bajor.
To access bajor, type the following command:
rlogin bajor
|
At bajor, type the following command to start oracle:
setup oracle9i
|
See "helpme setup" for
information on finding out what versions are available or
what to do if the setup statement does not
work.
After setup oracle, the command
"sqlplus" will run a
command-line-based SQL interface.
When being asked for user name and password, your user-name is the same as your Unix username, and your initial password is also your username. For example:
Enter user-name: abcde
|
Students are encourged to change their passwords at first time login.
To change password, type either "passw"
or "password".
The following parameters should be used when setting up JDBC or other web-based access to the Oracle database.
|
To open a connection to database, use the static getConnection()
method of the JDBC DriverManager class.
This method returns an object of the JDBC Connection class which
needs as input a userid, password, connect string that identifies the JDBC driver to use, and the name of
the database to which you want to connect.
Connecting to a database is a step where you must enter Oracle JDBC driver-specific
information in the getConnection() method.
Specifying a Database URL, Userid, and password:
getConnection(String URL, String user, String password);
|
where the URL is of the form:
jdbc:oracle:<drivertype>:@<database>
|
The following example connects user scott
with password tiger to a database with
SID db9i through port
1521 of host bajor.engr.scu.edu, using
the Thin driver:
|
PHP on the Linux student webserver can access Oracle data via the OCI8 PHP-Oracle connector. (http://linux.students.engr.scu.edu)
NOTE: There is currently no support for PHP access to Oracle on the Solaris web server. (http://students.engr.scu.edu or http://sol.students.engr.scu.edu)
Information necessary to connect to the DB from PHP:
(remember the user/pass are your Oracle user/pass, which may differ from your Unix or Windows user/pass)
|
For further information on actually using Oracle data from PHP, refer to the OCI8 documentation.
NOTE: For PHP to process your code, you need to give your file a ".php" extension.
Currently Oracle accounts are available only to students taking a database class or using a database for Senior Design work. Accounts will be removed by the start of the subsequent quarter. Students are encouraged to retain backups of their work as we will not be able to recover this data once accounts are removed.