Troubleshooting/FAQ/Tips
General
-
Your Oracle username is not the same as your undergrad's. It is "ora_" + [your
ugrad account login]. For example if your ugrad account is 'a1b2' then your Oracle
username is 'ora_a1b2'
- Your connection string needs to connect to dbhost,
not galiano. E.g., jdbc:oracle
:thin:@dbhost.ugrad.cs.ubc.ca:1521:ug
-
Are you using the correct server. You will find the best results when using the galiano
server - galiano.ugrad.cs.ubc.ca or remote.ugrad.cs.ubc.ca
-
Trying to connect to the oracle server when you are not on the wired UBC network will not
work without creating a SSH tunnel to the server. To create the tunnel follow these steps
- Set up
xManager
- Add tunneling by going to the connection "Properties" window:
Connection->SSH->Tunneling
Create a local outgoing connection on 1521. Destination host is dbhost.ugrad.cs.ubc.ca
port 1521.
- Disconnect and reconnect from remote.ugrad.
- Modify the connection screen to
jdbc:oracle:thin:@localhost:1521:ug
-
The above steps didn't work. This could be caused by your firewall so try turning it off
and if it now works, fix your firewall.
-
Here is how your
.bashrc file may look after adding the lines for
the environmental variables and paths to the bottom of the file:
. . .
export ORACLE_HOME=/home/o/oracle
export ORACLE_SID=ug
export LD_LIBRARY_PATH=/home/o/oracle/lib32
export PATH=${PATH}:/home/o/oracle/bin
# Be sure to end this line with a return, not the end of file!
# Otherwise the above code won't work.
- You can get your environment to read the file by executing the following command:
source ~/.bashrc
- I have totally messed up my shell so that I can't even get into my account anymore...
Send an email to help@ugrad.cs.ubc.ca and they should be able to reset your config files.
Just be sure to give them your login id.
-
If you cannot login to sqlplus or run your program because of a message
like "maximum simultaneous connections reached" then you may have some
outstanding connection processes that need to be killed. You can
identify these processes by typing ps -u <your_userid> at the
command prompt. Type ps -9 <process_pid> to kill a process
with pid <process_pid>.
-
A good way to find syntax errors is to place /* and */ in your code and
narrowing down to the source of the error using a binary search-like algorithm.
-
The best way to test your SQL statements is to use SQL*Plus.
-
To make the changes made in SQL*Plus visible to your program while you
are still in SQL*Plus, type commit in SQL*Plus. The reason
is that SQL*Plus doesn't commit the changes made by data manipulation language
statements, such as insert, update, and delete, until it exits. However,
data definition language statements such as, create and drop, automatically
issue a commit statement, so everything before is also committed.
-
If the output is cut off when you print a tutorial, try reducing the text/font
size in the browser.
-
You cannot create listeners with Oracle Client because the client is
not allowed to create an Oracle server.
- Oracle does not allow assertions
-
For SQL*Plus, you need to include the @ug when you enter your username
(this is only if you are connecting to the ugrad Oracle server).
- to list tables, use select table_name from user_tables;
If you have problems starting the Net8 assistant, turn off your computer,
wait a minute, and then turn it back on.
Java/JDBC
-
Don't include the @ug when you enter your username.
-
If you get a "string not terminated at end of line" compilation error then
you probably included a line break in the string, e.g. executeQuery("SELECT
a, b, c
FROM abc");
Do not line break a string. You can, however, do the following:
executeQuery("SELECT a, b, c " +
"FROM abc");
-
The debugger that comes with Java 2 SDK is called JDB.
-
Here is a sample program that connects
to DB2. You can study the code to find out how to load the driver
and make a database connection. Do not run the program without modifying
the connection info because it connects to a fictitious account and database.
PHP
- Apache won't start
- You are not using the galiano server
- Your environmental variables are not set up
- You haven't unzipped the apache files
- If it says a file doesn't exist or can't load, go look at the file to ensure it
either exists or isn't an empty file, if it is empty copy it over from the original
source.
- Some file didn't get extracted correctly, try deleting your apache folder
and trying again.
- Check that file permissions are set correctly