Oracle user documentation

From Syscore

Contents

Using oracle.gl

Accessing your oracle.gl account

To access oracle for your class, you must first have a Unix account. If you do not have one, please see the helpdesk in room ECS020. Once you have that, your teacher must have requested Oracle accounts for the students in your class, which would get you to here. Now, to log into Oracle to begin your work, please follow the following steps.

First log into your UMBC Unix account through ssh. This can be your gl account, Research account, and possibly other departmental accounts. Once you have logged in, then execute the following commands:

If you are using tcsh or csh:

source /usr/local/oracle/oracle.cshrc
sqlplus $USER

If you are using bash:

. /usr/local/oracle/oracle.profile
sqlplus $USER

At this point you should see a prompt on your screen asking for your password. This is asking for your Oracle password, which is initially the same as your username. Once you have logged in, you will see an SQL> prompt, at which you will type your sql commands. The first thing you should do is type the command "password", which will prompt for your old password, and then a new one twice. This is for security reasons, so please change your password.

If you note in the above command, you typed "$USER". The "$USER" can be replaced with your username or not. It will automatically be replaced with your login name by your shell. If you are logging in from a server where you have this software available, but your username is different than your GL username, then you will want to replace "$USER" with your GL username.

Troubleshooting

Here are a few things to watch for, and how to correct them. Most are out of your control, but we need you to notify the correct people when you see them.

  • ORA-01017: invalid username/password; logon denied

This means that either you have typed in your password wrong, specified your username incorrectly, or your correct GL username is not on the teacher's list. In the first case, try again, and if you still can't get it, send email to the address below. In the second case, specify your GL username correctly instead of using $USER. In the third case, have your teacher contact the address below with your correct GL username and ask to have your GL username added to their Oracle class.

  • ORA-01034: ORACLE not available

This is because you did not type "$USER" after sqlplus at the prompt. Be sure that you're spelling it correctly, and all those letters are capital.

  • ORA-12224: TNS:no listener

This is because the listener service on the server has stopped responding. Please either report this to the address below, or contact someone at the helpdesk in room ECS020( x53838 ) and report the problem.

  • ORA-12154: TNS: could not resolve service name

For this to happen you must be specifying the ORACLE_SID incorrectly. This should never occur if you follow the instructions above. This probably means you are specifying something after your username such as typing "sqlplus $USER@GU". There should not be anything directly after your username. If you are trying to specify a file to read commands in from, you should have a space befor the "@filename". This error might also occur if your Oracle account password contains a space or @ character. In this case, contact the OIT HelpDesk to have your password reset.

  • ORA-12535: TNS: Time-out error

Access to the oracle.gl server is currently restricted to on-campus users. Access to the GL server is blocked by the campus firewall and attempts to connect just result in a timeout with no response. Please log in to one of the public gl.umbc.edu machines using ssh and connect to the oracle server from there.

  • SP2-0332: Cannot create spool file.

This means that it could not create the file specified. This is usually for one of two reasons. One is because you are over quota. You can check this by typeing "quota -v" from your unix prompt(same place you typed sqlplus). Another reason is that you type sqlplus while you were in a directory that you could not write to. The filename specified after "spool" is created in your current directory.

  • sqlplus: Command not found.

This probably means that you forgot to type "source /usr/local/oracle.cshrc", or the equivilent. The command means that "sqlplus" is not in your path, and the source command extends you path so that it will be.

Helpful Tips

  • The uniread utility can be used to add GNU Readline support to sqlplus; just use the command uniread sqlplus instead of sqlplus on any linux or solaris machine.

Using Oracle from PHP

Using Oracle from PHP from the Core Web Environment, including userpages, is very simple.

To connect to the database, you should use a statement simliar to this:

$conn = OCILogon( $user, $password, $database );

Where $database is the instance you wish to connect to, such as GL.

Do NOT set environment variables such as ORACLE_HOME, LD_LIBRARY_PATH, ORACLE_SID, or TWO_TASK. These will lead you into a world of pain. We set these correctly in our web server's environment based on the version of the Oracle client that it is currently compiled against.

Requesting Oracle Accounts For a Course

Oracle database accounts are available for any course to use, just send an email to helpdesk@umbc.edu stating that you want to request oracle.gl accounts be generated for your class. The only information we need is the semester, course code, and section number. We will automatically generate accounts for all the students that are currently enrolled in the class and for yourself (if you don't already have an account). If you would like accounts generated for any TA's you may have, please include their usernames.

If you anticipate that the accounts for your course will require additional space over the normal default 1M quota, just let us know.

The student accounts will be deleted not less than one month after the end of the semester.