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
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."Create your directory:
/home/oracle/sqlbib/oracle_acme
.Download corresponding scripts from the accompanying SQL Bible website to the directory you created.
Change your current directory to
/home/oracle/sqlbib/oracle_acme
and start SQL*Plus by typing the following:# sqlplus /nolog
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 fileload.log
to be created in the same directory as your other files, type:SQL> spool load.log
Run the
sqlbib/oracle_acme/load.sql
script:SQL> @load.sql
This script creates your Oracle ACME database. Stop spooling (if started) by issuing the following command:
SQL> spool off
Type
quit
to exit SQL*Plus.Check the file
load.log
for possible errors.
Microsoft ...
Get SQL Bible, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.