Installing the ACME Database on DB2 UDB 8.1 (Windows) Using CLP
Following are instructions on how toinstall ACME sample database on DB2 UDB 8.1 (Windows) using the CLP utility
(explained in
Appendix
E).
Copy the D:\sqlbib\db2_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.
Make sure you created the ACME database as described in the
Postinstallation tasks section of
Appendix
D, and that your database has been started.
Open the DB2 UDB Command window (StartàProgramsàIBM
DB2àCommand Line ToolsàCommand Window).
Issue the two following commands at the prompt (if you want your
log files in
C:\sqlbib\db2_acme\):
C:\Program
Files\IBM\SQLLIB\BIN> db2 –tvfC: \sqlbib\db2_acme\create_acme_db2.sql
-zC:\sqlbib\db2_acme\ create_acme_db2.log C:\Program Files\IBM\SQLLIB\BIN>
db2 -tvfC: \sqlbib\db2_acme\load_data_db2.dat -zC:\sqlbib\db2_acme
\load_data_db2.log
Note | Each of these is actually one command, although the physical dimensions of the printed book dictate that they be presented in this way. |
Some common errors from running DB2 scripts
are shown in
Table
F-2.
Error | Explanation | Solution |
---|---|---|
DB21061E Command line environment not initialized. | You are trying to execute db2 commands from a command line prompt rather than from the DB2 Command Window. | Start the DB2 Command Window and try again. |
SQL0900N The application state is in error. A database connection does not exist. SQLSTATE=08003 | You supplied an incorrect service name. | Specify the correct service name. |
SQL1032N No start database manager command was issued. SQLSTATE=57019 | Database services are not started. | Start database services as described in Appendix D. |