Hello,
Truncate in DB2 is a funny one, it removes the data but it keeps the space that table used reserved in the table space to be reused by that table specifically unless you tell it not to.
If you want to reclaim some disk space you need to first tell the truncate statement you want the space to be released from the table once the truncate has ran, see drop storage here.
So your truncate command ends up looking like this
TRUNCATE TABLE A_WORKORDER DROP STORAGE IMMEDIATE
This however just releases the space back to the table space itself not the disk so any table within that table space can consume it, the next step is to shrink the table space which will release that storage back to the disk. The details of the commands can be found here specifically the lower high water mark and the reduce max arguments.
There are a couple of assumptions I'm making here that are worth noting
- I'm assuming your table spaces are using Automatic Storage
- I'm assuming your table space is called MAXDATA - the default name for the Maximo Data table space.
--Lower the High Watermark
ALTER TABLESPACE MAXDATA LOWER HIGH WATER MARK;
--Reduce the Tablespace size
ALTER TABLESPACE MAXDATA REDUCE MAX;
------------------------------
Chris Brown
Naviam
------------------------------
Original Message:
Sent: 05-07-2026 07:53
From: Naveed Wasay
Subject: Need to truncate audit tbale in DB2
Thanks for help.
I truncated the table , but the size in storage is not reflecting .
Do i need run REORG TABLE schema_name.table_name;
REORG MAXIMO A_WORKORDER
------------------------------
Naveed Wasay
Serco
Original Message:
Sent: 05-06-2026 09:32
From: Steven Shull
Subject: Need to truncate audit tbale in DB2
Audit tables are purely informational for the customer and have no functional meaning to Maximo. That's the reason why it's safe to truncate that table without impacting Maximo.
WORKORDER and the supporting tables are functional tables so deleting is more problematic and there are references to workorder in many tables (DOCLINKS, LONGDESCRIPTION, MATUSETRANS, MATRECTRANS, TOOLTRANS, etc.) and customers add their own custom tables too. There are third party archiving utilities that are built to try and handle this when you're talking about production systems.
For the non-production systems, you can opt to take this risk, but you may encounter unusual issues.
------------------------------
Steven Shull
Naviam
Original Message:
Sent: 05-06-2026 01:46
From: Naveed Wasay
Subject: Need to truncate audit tbale in DB2
Thanks Steven from your answer,
Can I use truncate for all work order related table. (WORKORDER+WPMATERiAL+LABTRAN)
Actually we have a non-production environment and storage, so we nee free up some space.
-Naveed
------------------------------
Naveed Wasay
Serco
Original Message:
Sent: 05-05-2026 11:15
From: Steven Shull
Subject: Need to truncate audit tbale in DB2
If you don't need the data, the best way is absolutely to truncate the table (TRUNCATE TABLE A_WORKORDER IMMEDIATELY).
To get the total size of the table in DB2 you can use something like this:
SELECT
(data_object_p_size + index_object_p_size + long_object_p_size +
lob_object_p_size + xml_object_p_size) AS TOTAL_SIZE_KB
FROM TABLE (SYSPROC.ADMIN_GET_TAB_INFO('MAXIMO', 'A_WORKORDER'))
------------------------------
Steven Shull
Naviam
Original Message:
Sent: 05-04-2026 04:57
From: Naveed Wasay
Subject: Need to truncate audit tbale in DB2
Hi
What is the best query to truncae A_WORKORDER in DB2 to create space in the storage
How can if ind size of the table.
Regards
Naveed
#Administration
------------------------------
Naveed Wasay
Serco
------------------------------