Set tablespace and page sizes for DB2 session databases


 

+

Search Tips   |   Advanced Search

For DB2 session persistence, we can increase the page size to optimize performance for writing large amounts of data to the database. Page sizes of 8K, 16K, and 32K are supported.

To use a page size other than the default (4K)...

  1. If the SESSIONS table already exists, drop it from the DB2 database.

  2. Create a new DB2 buffer pool and table space, specifying the same page size (8K, 16K or 32K) for both, and assign the new buffer pool to this table space.

     DB2 Connect to session DB2 CREATE BUFFERPOOL sessionBP SIZE 1000 PAGESIZE 8K DB2 Connect reset DB2 Connect to session DB2 CREATE TABLESPACE sessionTS PAGESIZE 8K MANAGED BY SYSTEM 
        USING ('D:\DB2\NODE0000\SQL00005\sessionTS.0') BUFFERPOOL sessionBP DB2 Connect reset
    

  3. Set the correct table space name and page size in the Session Management facility. Page size is referred to as row size on the Session Management page.)

When WAS is restarted, the Session Management facility creates the new SESSIONS table in the specified tablespace based on the indicated page size.

 

Related tasks

Set for database session persistence