I used a batch process to convert segmented tablespaces with one table to UTS/PBG. I did an unload first to create the alter statements in a flat file:
SELECT
CAST
(' ALTER TABLESPACE ' CONCAT STRIP(P.DBNAME, BOTH) CONCAT '.'
CONCAT STRIP(P.NAME,BOTH) CONCAT ' MAXPARTITIONS 5;'
AS VARCHAR(80))
FROM SYSIBM.SYSTABLESPACE P
WHERE P.DBNAME = 'ABCDB'
AND P.MAXPARTITIONS < 5
AND P.NTABLES = 1
AND P.TYPE = ''
;
I then executed IKJEFT01 to execute the alter commands, then followed that with an online reorg with SCOPE PENDING. I did this at the database level. It all worked great. The only issues I encountered had to do with the base table for LOBs. When you alter the base table to UTS/PBG you have to run a reorg specifying the base table only and cannot use tape stacking. The reorg of the base table will also trigger a reorg of the aux table. We do inline image copies written directly to vtape; tape stacking is not allowed in this situation which I think is odd and it caused some failures so I had to separate those tables out of the reorg step and run a separate step with no tape stacking.
This took several months to complete but it worked great.
------------------------------
RussellPetersCentral Technology Services
------------------------------
Original Message:
Sent: Nov 07, 2022 10:21 AM
From: VASUDEVAN NATARAJAN
Subject: Moving tables from non-UTS tablespace (segment table spaces)
Is IBM Db2 providing any option under Db2 admin tool to move tables from segmented table space ? I am hearing that we need to do that manually - if there is an option or anyone having some experience kindly share the same.
Thanks in advance
------------------------------
VASUDEVANNATARAJANwalmart
------------------------------