Previous Topic

Book Contents

Book Index

Next Topic

Scripts

This example is covering a new database creation in the DB2LUW environment.

Use the DB2 Control Center to create database, bufferbools and tablespaces.

Best practice:

  1. Create a database.
  2. Increase values of the parameters from DB2 ControlCenter:
    • APPHEAPSZ to 409
    • STMTHEAP to 238768
  3. Open the database.
  4. Create a bufferpool with 8kb page size.
  5. Create a bufferpool with 16kb page size.
  6. Create bufferpool with 32kb page size.
  7. Create a regular tablespace with 8kb page size (assigned to 8kb bufferpool).
  8. Create a regular tablespace with 16kb page size (assigned to 16kb bufferpool).
  9. Create a regular tablespace with 32kb page size (assigned to 32kb bufferpool).
  10. Create a system temporary tablespace with 32kb page size (assigned to 32kb bufferpool).

All the actions listed above can be done in the db2 command window using the provided example scripts:

  1. Create a database <dbname>(*)
  2. Connect to <dbname>(*)
  3. Use {script_path}/util/upddparms.sql to process recommended changes in database parameters.
  4. Use {script_path}/util/bp_ts_win.sql as an example of how to to create the needed bufferpools and tablespaces.

*Replace <dbname> with the name of your database.

See Also

DB2