|
|
Archives of the TeradataForum
Message Posted: Wed, 19 Apr 2006 @ 19:14:20 GMT
Subj: | | Re: Spool space available before running my query |
|
From: | | Clark, Dave |
Here are a few queries that may be of use.
-dave.clark
-------------------------------------------
/* TOTAL DISK SPACE */
select sum(MaxPerm) from dbc.Diskspace;
/* DISK SPACE IN USE */
sel sum(CurrentPerm),
sum(MaxPerm),
((sum(currentperm) / NULLIFZERO(sum(maxperm)) * 100))
(title '%MaxPerm', format 'zz9.99')
from dbc.diskspace;
/* DISK SPACE FREE */
sel sum(MaxPerm) - sum(CurrentPerm)
(FORMAT 'ZZZ,ZZZ,ZZZ,ZZZ,ZZ9',TITLE 'Free Perm'),
(((sum(MaxPerm) - (sum(CurrentPerm)) - sum(CurrentSpool))
/ NULLIFZERO(sum(MaxPerm))) * 100)(title'% Free', format'zz9.99')
from dbc.diskspace;
/* DISK AVAIL FOR SPOOL */
sel sum(MaxPerm) - sum(CurrentPerm)
(FORMAT 'ZZZ,ZZZ,ZZZ,ZZZ,ZZ9',TITLE 'Free Perm'),
(((sum(MaxPerm) - sum(CurrentPerm)) / NULLIFZERO(sum(MaxPerm))) * 100)
(title'% Avail for Spool', format'zz9.99')
from dbc.diskspace;
/* PERCENT OF DISK NOT IN USE BY PERMANENT TABLES IS AVAIL FOR SPOOL */
sel ((sum(Currentspool) / (NULLIFZERO(sum(maxperm)) - sum(currentperm))) * 100)
(title'% Used By Spool', format'zz9.99')
from dbc.diskspace;
| |