Skip to content

Script to find Netezza database size

You cna run below script to find the total space allocated to a Netezza database as well as used space.

SELECT o.dbname DatabaseName,((SUM(z.ALLOCATED_BYTES)/1024)/1024)/1024 AllocateSpaceGB,
((SUM(z.Used_BYTES)/1024)/1024)/1024 UsedSpaceGB, (AllocateSpaceGB-UsedSpaceGB) FreeSpaceGB
FROM _V_SYS_OBJECT_DSLICE_INFO z
JOIN _v_object_data o ON o.objid = z.tblid GROUP BY o.dbname order by o.dbname;