How to Find Your Database Schema Size in GB (SQL Server, Oracle, DB2)
Before we can prepare an APIX archiving proposal, we need one number from you: the total database schema size, in gigabytes (GB). Below are simple queries for the three most common database platforms. Run the one that matches your environment using an account with catalog/dictionary access, and send us the result.
Microsoft SQL Server
Run this against your production database. It returns the size of each schema, including data and indexes:
SELECT s.name AS schema_name,
CAST(SUM(a.total_pages) * 8.0 / 1024 / 1024 AS DECIMAL(10,2)) AS size_gb
FROM sys.tables t
JOIN sys.schemas s ON t.schema_id = s.schema_id
JOIN sys.indexes i ON t.object_id = i.object_id
JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id
JOIN sys.allocation_units a ON p.partition_id = a.container_id
GROUP BY s.name
ORDER BY size_gb DESC;
Oracle
Replace YOUR_SCHEMA with your production schema name (for Infor Lawson environments this is often LAWSON):
SELECT owner AS schema_name,
ROUND(SUM(bytes)/1024/1024/1024, 2) AS size_gb
FROM dba_segments
WHERE owner = 'YOUR_SCHEMA'
GROUP BY owner;
IBM DB2 (LUW)
Replace YOUR_SCHEMA with your production schema name:
SELECT tabschema AS schema_name,
ROUND(SUM(data_object_p_size + index_object_p_size + long_object_p_size
+ lob_object_p_size + xml_object_p_size)/1048576.0, 2) AS size_gb
FROM sysibmadm.admintabinfo
WHERE tabschema = 'YOUR_SCHEMA'
GROUP BY tabschema;
Getting your database version
While you’re connected, run the one-liner for your platform and include the output:
-- SQL Server
SELECT @@VERSION;
-- Oracle
SELECT banner FROM v$version;
-- DB2 (LUW)
SELECT service_level, fixpack_num FROM sysibmadm.env_inst_info;
What to send us
Reply to your Nogalis contact with the schema size in GB, your database platform, and the version output above. That’s all we need to prepare your proposal.


