Troubleshooting/FAQ/Tips

General

  1. 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'
  2. Your connection string needs to connect to dbhost, not galiano. E.g., jdbc:oracle :thin:@dbhost.ugrad.cs.ubc.ca:1521:ug
  3. 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
  4. 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
  5. 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.
  6. Here is how your .bashrc file may look after adding the lines for the environmental variables and paths to the bottom of the file:
  7. . . .
    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.
  8. You can get your environment to read the file by executing the following command:
    source ~/.bashrc
  9. 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.
  10. 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>.
  11. 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.
  12. The best way to test your SQL statements is to use SQL*Plus.
  13. 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.
  14. If the output is cut off when you print a tutorial, try reducing the text/font size in the browser.
  15. You cannot create listeners with Oracle Client because the client is not allowed to create an Oracle server.
  16. Oracle does not allow assertions
  17. 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).
  18. 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

  1. Don't include the @ug when you enter your username.
  2. 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
        1.         FROM abc");
    Do not line break a string.  You can, however, do the following:
     executeQuery("SELECT a, b, c " +
           "FROM abc");
  3. The debugger that comes with Java 2 SDK is called JDB.
  4. 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

  1. Apache won't start