Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free Space

Status
Not open for further replies.

dspjkr

MIS
Oct 27, 2003
4
0
0
US
We have a table that is split across three dbspaces. When it was set up it was given a very large next extent. So when it grabbed the next extent it took the remaining space in all three dbspaces. Is there a way to show how much space is actually being used. The query I have shows the dbpsaces as 100% full, but I think that is only because the next extent claimed the rest of the space.

Thanks in advance for the help.
 
Hi,

The following SQL statement may help you in ascertaining used and free space per dbspace:

SELECT sd.name,
ROUND(
SUM( sc.chksize *
( select sh_pagesize from sysmaster:sysshmvals
)/1024/1024
)
,4) mb_chksize,
ROUND(
SUM( sc.nfree *
(
select sh_pagesize from sysmaster:sysshmvals
)/1024/1024
)
,4) mb_chkfree,
ROUND( 100 / SUM(sc.chksize) * SUM(sc.nfree),4) pct_free

FROM sysmaster:sysdbspaces sd,
sysmaster:syschunks sc

WHERE sd.dbsnum = sc.dbsnum
GROUP BY 1

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top