Each student needs:

- An oracle account, with appropriate privileges.  The account name doesn't
  matter.  If each student has their own Oracle server (that is, Oracle
  Database is installed on each student's classroom PC), then 'STUDENT'
  works fine.  If multiple students will connect to a single Oracle
  instance, then each Oracle account must have a unique name: 'S1',
  'S2', 'S3', etc.

  The accompanying script, create_oracle_user.sql, contains the syntax
  to create the account.  Run the script as the Oracle SYS user with
  SYSDBA privilege.  You must pass the account name on the command line:

    sqlplus sys/syspassword as sysdba @create_oracle_user.sql STUDENT
    sqlplus sys/syspassword as sysdba @create_oracle_user.sql S1
    sqlplus sys/syspassword as sysdba @create_oracle_user.sql S2
    ...


- A copy of the student files, extracted to a directory accessible from
  the student's database client.  Usually, the student files are
  distributed as a ZIP file.  In a UNIX environment, this ZIP should be
  extracted into each student's home directory.  On Windows, it can be
  extracted to the C: drive.  The name of the ZIP, and the directory
  into which it extracts, depends on the specific course being set up.

  The student files include online examples, lab solutions, and the
  database setup scripts to create the student's sample tables for use
  during class.


- The sample tables created and loaded with the accompanying data.
  Each student's Oracle account has a separate copy of the tables and
  data.

  There are two ways to load the tables.  Which one you choose depends on
  your own preference:

  - As SYSTEM, use Oracle's 'imp' utility to import the tables and data
    from the exp dump provided, student.dmp.  Be sure to load the data
    into the student's Oracle account schema.  The dump file was created
    from an Oracle account named 'STUDENT':

      imp system/systempw file=student.dmp fromuser=STUDENT touser=STUDENT
      imp system/systempw file=student.dmp fromuser=STUDENT touser=S1
      imp system/systempw file=student.dmp fromuser=STUDENT touser=S2
      ...

  - OR, as the student's Oracle user, run the accompanying SQL script
    (in SQL*Plus or another client application), create_student_tabs.sql:

      sqlplus student/student @create_student_tabs.sql
      sqlplus s1/s1 @create_student_tabs.sql
      sqlplus s2/s2 @create_student_tabs.sql
      ...

  This script will prompt you for the lobdir location.  This should be the
  path up to and including the 'lobdata' directory, such as:
  '/home/student/admin/lobdata'.  An absolute path must be given.  A relative
  path will cause an error.  The 'oracle' user must also have full permissions
  on all directories in this path.  You can move the lobdata directory if you
  cannot provide permissions to its current location.

  The script 'create_lobdata.sql' is provided to separately create the lobdata
  if the previous script errors out while attempting to create the lobdata.
  Run it with the following command, typing in the correct lob data directory
  when prompted.

      sqlplus student/student @create_lobdata.sql
      sqlplus s1/s1 @create_lobdata.sql
      sqlplus s2/s2 @create_lobdata.sql
      ...

  Either method creates the following objects in the student's schema:

    SEQUENCE PERSON_ID_SEQ
    TABLE ACCOUNT
    TABLE ACCOUNT_TYPE
    TABLE EMPLOYEE
    TABLE INVENTORY
    TABLE ORDER_HEADER
    TABLE ORDER_ITEM
    TABLE PAY_TYPE
    TABLE PERSON
    TABLE PO_HEADER
    TABLE PO_ITEM
    TABLE PRODUCT
    TABLE PRODUCT_CATEGORY
    TABLE STORE
    TABLE VENDOR

  The accompanying script drop_student_tabs.sql is provided, in case
  you wish to drop and reload the tables for any reason.  Or, you can
  drop the student's Oracle account and start over.

- If the instructor wishes to demonstrate the UTL_MAIL package, and let the
  students run a UTL_MAIL example, on each Oracle Database host that will be
  used in class the following standard Oracle-supplied scripts must be run:

    sqlplus sys/syspassword as sysdba @$ORACLE_HOME/rdbms/admin/utlmail.sql
    sqlplus sys/syspassword as sysdba @$ORACLE_HOME/rdbms/admin/prvtmail.plb

  The DBA must also set the system parameter SMTP_OUT_SERVER to the name of
  a valid mail server host that is configured to allow relaying from the
  database host.

- If the instructor wishes to demonstrate the DBMS_TRACE package, and allow
  students to execute examples, the following Oracle-supplied script must be
  run:

    sqlplus sys/syspassword as sysdba @$ORACLE_HOME/rdbms/admin/tracetab.sql

  In addition, each student must be granted EXECUTE privilege on the
  DBMS_TRACE package, and SELECT privilege on the sys.plsql_trace_runs and
  sys.plsql_trace_events tables.


NOTE FOR LINUX ADMINISTRATORS:
  The script setup_linux_accounts.sh is provided as an example of how one
  might automate classroom setup for single or multiple accounts on a
  Linux Oracle Database host system.  It is provided as is, for use or
  adaptation at your own risk.

