FAQ

 

  1. What can I read to refresh myself with respect to the background material assumed from CS 342 and CS 354?
  2. This course assumes knowledge of file management and of concurrent programming problems and solutions. Most texts on operating systems cover this material. For example, you may wish to read one of

  3. Can the assignments be done in groups?
  4. Yes, all assignments can be done individually or in pairs. Your partner may be from either section of the course, and can change from one assignment to the next.

    If you do an assignment as a pair, you should hand in only one copy with both names and ids; you will both be assigned the same grade.

  5. Are there presentation slides for learning DB2?
  6. Yes, they are here in postscript format. These will be presented on January 26th in class.

  7. How do I get an account for DB2?
  8. You don't need one. All you need is your undergraduate account to run DB2.

  9. Do I have to do any preparations before being able to run DB2?
  10. Yes. Before being able to run db2 you will need to login onto the undergraduate machine merrill and set certain environment variables. If you are running sh or bash shell type:
    /u/cs448/public/db2profile
    If you are running csh or tcsh shell type:
    source /u/cs448/public/db2cshrc

  11. Do I have to set the environmental variables each time before I run DB2?
  12. Yes. If you want to avoid doing so you can set the environment variable initialization lines in .profile for sh and bash shells, in .cshrc for csh shells and in .tchrc for tcsh shells

  13. How do I issue SQL commands?
  14. From either interactive, batch or command mode.

  15. How do I issue SQL commands interactively?
  16. Type db2 after initializing the environmental variables. Then you will enter the DB2 environment indicated by the db2 prompt where you can issue db2 commands.

  17. How do I issue SQL commands from a batch file?
  18. Write a batch file containing SQL commands. Type db2 -f filename to execute it.

  19. How do I issue SQL commands from the UNIX command prompt?
  20. Type db2 followed by the SQL command in brackets. For example:
    db2 "select firstnme, lastname from db2_inst.employee where empno = '000010'"

  21. Can I issue other commands in DB2 other than SQL commands?
  22. Yes. You can issue DB2 system commands. Type ? in interactive mode for a list of all DB2 system commands.

  23. How do I connect to a database schema?
  24. Issue the DB2 system command: connect to schema_name

  25. What is the default schema name?
  26. sample

  27. I set the environment variables, I started the db2 interactive mode, I connected to the sample database schema, now what?
  28. Try running some SQL queries. To see what tables are available in the schema you have connected to type: list tables.

  29. I ran an SQL statement and I got an error. What do I do now?
  30. When you got the error you got a SQL state code. Type ? and the code to get more information on the error.

  31. Where can I get help on SQL?
  32. There are a number of sources. The following are some that you should check out:

  33. Where do I get more help about DB2 specifically?
  34. Check out the following:


Home | General Information | Weekly Schedule

Course Notes | Newsgroup | Assignments & Exams | FAQ


Last updated 11 January 2001