Creating the Sample Database - IBM DB2 9.x
To create books in IBM DB2 9.x:
db2cc.
books in the Database Name box; specify a destination; then click Finish.
books appears in the Databases folder and the All Databases folder in Control Center.
db2batch -d books -f books_db2.sql-f option specifies the name of the SQL file. You can include an absolute or relative pathname (see the "Pathnames" sidebar in "Running SQL Programs" in Chapter 1). You can add the option -a user[/password] to connect to the database as a specific user.
db2batch displays the results. Ignore the messages about undefined names (nonexistent tables) — they're caused by the script's DROP TABLE statements, which you'll need to rerun books_db2.sql later to restore the tables to their original states.
books, see "IBM DB2" in Chapter 1.
Tips
db2batch in step 5, you can use the db2 command-line processor in script mode (see "IBM DB2" in Chapter 1).
books_db2.sql differs slightly from the standard SQL script books_standard.sql. In the DB2 script, date literals don't have the DATE keyword. (The standard date DATE '2000-08-01' is equivalent to the DB2 date '2000-08-01', for example.)