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.
Following are instructions on how to install ACME sample database on Oracle 9i (Windows) using the SQL*Plus utility (explained in Appendix E).
If the Oracle services are not started, start them as described in Appendix D.
Copy the D:\sqlbib\oracle_acme (where D is the letter of your CD-ROM drive) directory from the CD-ROM that comes with your book to the C:\ directory of your computer.
Start SQL*Plus from the command line by typing:
C:\> sqlplus /nolog
If you want to create a log file, use the spool command (described in Appendix E). For example, if you want the resulting log file load.log to be created in the same directory, the other files you need are:
SQL> spool C:\sqlbib\oracle_acme\load.log
Run script C:\sqlbib\oracle_acme\load.sql:
SQL> @C:\sqlbib\oracle_acme\load.sql
This script creates the Oracle ACME database. Stop spooling (if started) by issuing:
SQL> spool off
Type quit to exit SQL*Plus.
Note |
Script load.sql runs two other scripts, create_acme_ora.sql and load_data_ora.dat. The first one creates RDBMS objects (tables, indexes, constraints, views, and so on) and the second script populates ACME tables with data. You may want to run the first script by itself before trying the examples from Chapter 6. You can run load.sql and create_acme_ora.sql as many times as you want to create a loaded or empty ACME database, correspondingly. |
When you run your script for the first time, you may see ORA-00942 errors (table or view does not exist). That is not a problem; the script is trying to drop tables that do not yet exist.
The most common errors you may see in your log file are in Table F-1.
Error |
Explanation |
Solution |
---|---|---|
ORA-12560: TNS: protocol adapter error |
Oracle is not started. |
Start Oracle and try running your scripts again. |
ORA-12154: TNS: could not resolve service name |
You supplied an incorrect service name. |
You don't need to supply a service name, just user ID and password. |
ORA-01031: insufficient privileges |
You are not a member of ORA_DBA OS group. |
Either log in as a user who is a member of the ORA_DBA group or add current user to the ORA_DBA group. |
ORA-01033: Oracle initialization or shutdown in progress |
Oracle is being started. |
Wait and try again. |