top of page

How to change Db2 database pagesize?

In this article we will see and learn about DB2 database pagesize and how can you change the pagesize value?


Db2 database page and pagesize.

The logical view of a database consists of the standard objects in any RDBMS – Tables, Indexes, etc. The smallest unit of I/O that DB2 can handle is a page. By default, the default page size is 4K or 4,096 bytes. The default can be set to one of the other possible values when the databases is created using the PAGESIZE clause of the CREATE DATABASE statement.


Changing Db2 database pagesize.

There may be occasions that you want to change the tablespaces from the current pagesize to a different one, or it is possible you may be experiencing pagesize issue. But rather than focusing on the DB2 database pagesize focus on the tablespace pagesizes. The Db2 database pagesize parameter contains the value that was used as the default page size when the database was created. When a buffer pool or table space is created in that database, the same default page size applies. You can specify below values for page size for any tablespace, providing you have a bufferpools with matching page size.

  • 4K or 4,096 bytes (Default)

  • 8K or 8,192 bytes

  • 16K or 16,384 bytes

  • 32K or 32,768 bytes

Steps to follow for changing database pagesize values whenever you face pagesize issue or to use a page size other than the default (4K):

db2 Connect to TestDB
db2 CREATE BUFFERPOOL TestDB SIZE 2000 PAGESIZE 16K
db2 Connect reset
db2 Connect to TestDB
db2 CREATE TABLESPACE TestDBTS PAGESIZE 16K MANAGED BY SYSTEM USING ('\db2home\NODE0000\SQL00002\sessionTS.0') BUFFERPOOL TestDBBP
db2 Connect reset

That's all in this post. If you liked this blog and interested in knowing more about IBM Db2. Please Like, Follow, Share & Subscribe to www.ImJhaChandan.com

Comentários


jc_logo.png

Hi, thanks for stopping by!

Welcome! to my “Muse & Learn” blog.

This website will help you to learn useful queries/SQL, Tips to troubleshoot problem and their remediation, perform DB related activities etc... and don't forget to muse with us :)....

It cover few useful information on below topics :

 

MySQL, SQL Server, DB2, Linux/UNIX/AIX, HTML ....

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • Twitter
© 2023 By ImJhaChandan
bottom of page