db2db2-luwtablespacepage-size

How to create a larger temporary tablespace?


I installed a DB2 Express C DB2 instance on my windows machine and use it in JUnit tests for testing some code.

With one statement I get the following errorcode:

DB2 SQL Error: SQLCODE=-1585, SQLSTATE=54048, SQLERRMC=null, DRIVER=4.15.134

I learned that this is probably because the page size of my temporary tablespace is to small.

I confirmed this by estimating the row size at about 16k and discovering using IBM Data Studio that my temporary tablespace has a page size of 8k. I therefore want to create a new temporary tablespace with page size 32k.

I tried doing this with the IBM Data Studio, but the field for the page size contains always 8 KB and can't be edited.

I came a little closer to my goal by using the "Befehlszeilenprozessor" I guess that translates to commandline interpreter or something. I executed the following command:

CREATE SYSTEM TEMPORARY TABLESPACE tmp_tbsp PAGESIZE 32K MANAGED BY SYSTEM USING ('C:\DB2\NODE0000\SAMPLE\TNEWTEMP')

And got the following result:

DB21034E  Der Befehl wurde als SQL-Anweisung verarbeitet, da es sich um     
keinen gültigen Befehl des Befehlszeilenprozessors handelte.  Während der 
SQL-Verarbeitung wurde Folgendes ausgegeben:
SQL1582N  Die Seitengröße (PAGESIZE) für den Tabellenbereich "TMP_TBSP" stimmt
nicht mit der Seitengröße für den Pufferpool "IBMDEFAULTBP" überein, der
diesem Tabellenbereich zugeordnet ist.  SQLSTATE=428CB

I guess the relevant part roughly translates to:

SQL1582N  the page size (PAGESIZE) for the table space "TMP_TBSP" does not 
match the page size of the buffer pool "IBMDEFAULTBP" assigned to this 
tablespace.  SQLSTATE=428CB

So how can I make a temporary tablespace matching my requirements?


Solution

  • There must be a bufferpool with the matching page size for each tablespace. Use the CREATE BUFFERPOOL statement to create one.