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:
- Create a database.
- Increase values of the parameters from DB2 ControlCenter:
- APPHEAPSZ to 409
- STMTHEAP to 238768
- Open the database.
- Create a bufferpool with 8kb page size.
- Create a bufferpool with 16kb page size.
- Create bufferpool with 32kb page size.
- Create a regular tablespace with 8kb page size (assigned to 8kb bufferpool).
- Create a regular tablespace with 16kb page size (assigned to 16kb bufferpool).
- Create a regular tablespace with 32kb page size (assigned to 32kb bufferpool).
- 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:
- Create a database <dbname>(*)
- Connect to <dbname>(*)
- Use {script_path}/util/upddparms.sql to process recommended changes in database parameters.
- 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.
|