Hi guys,
I Am using sql server free version for learning purpose.
How to check how much GB the server is providing (in percentage)as a free version?
like below as example
(1) Total Space:10gb
(2) used space=7gb
(3) Remaining space: 3gb
How to check the remaining free space of server?
What I have tried:
SELECT
t.object_id,
OBJECT_NAME(t.object_id) ObjectName,
sum(u.total_pages) * 8 Total_Reserved_kb,
sum(u.used_pages) * 8 Used_Space_kb,
u.type_desc,
max(p.rows) RowsCount
FROM
sys.allocation_units u
JOIN sys.partitions p on u.container_id = p.hobt_id
JOIN sys.tables t on p.object_id = t.object_id
GROUP BY
t.object_id,
OBJECT_NAME(t.object_id),
u.type_desc
ORDER BY
Used_Space_kb desc,
ObjectName;