O'Reilly logo

SQL Bible, Second Edition by Boris M. Trukhnov, Alex Kriegel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix F. Installing the ACME Database

This appendix explains how to install the sample ACME database on the RDBMS of your choice. Refer to the section that corresponds to the database platform you've created.

Installing the ACME Database on Oracle 11g Using SQL*Plus

Following are instructions on how to install the ACME sample database on Oracle 11g using the SQL*Plus utility (explained in Appendix E, "Accessing RDBMS").

Linux / Unix

  1. Start your Oracle instance. Make sure that your session's ORACLE_SID environment variable points to the correct instance:

    # echo $ORACLE_SID
    ACME
    #

    Note

    The Unix/Linux environment variables required to run the sqlplus utility are listed in Table D-2 of Appendix D, "Installing RDBMS Software."

  2. Create your directory: /home/oracle/sqlbib/oracle_acme.

  3. Download corresponding scripts from the accompanying SQL Bible website to the directory you created.

  4. Change your current directory to /home/oracle/sqlbib/oracle_acme and start SQL*Plus by typing the following:

    # sqlplus /nolog
  5. If you want to create the log file, use the spool command (described in Appendix E, "Accessing RDBMS"). For example, if you want the resulting log file load.log to be created in the same directory as your other files, type:

    SQL> spool load.log
  6. Run the sqlbib/oracle_acme/load.sql script:

    SQL> @load.sql
  7. This script creates your Oracle ACME database. Stop spooling (if started) by issuing the following command:

    SQL> spool off
  8. Type quit to exit SQL*Plus.

  9. Check the file load.log for possible errors.

Microsoft ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required