|
|
Archives of the TeradataForum
Message Posted: Tue, 17 May 2005 @ 13:34:09 GMT
Subj: | | Re: Error 2644 - No more room in database |
|
From: | | Geoffrey Rommel |
select vproc,db2.databasename
,cast( sum(dbs.maxpermspace) / (1024*1024*1024) as decimal(10,4)) AllocSpaceGB...
from dbc.databasespace dbs, dbc.databases2 db2 ...
DBC.DatabaseSpace contains rows for each table and also rows for table '00000000'xb = 'All', so the space will be counted twice. Also, it
is usually not good practice to join DBC tables with DBC views. The following query should give more sensible results.
select vproc,databasename
,cast( sum(maxperm) / (1024*1024*1024) as decimal(10,4)) AllocSpaceGB
,cast( sum(currentperm) / (1024*1024*1024) as decimal(10,4)) UsedSpaceGB
,cast( (sum(maxperm) - sum(currentperm)) / (1024*1024*1024)
as decimal(10,4)) FreeSpaceGB
from dbc.diskspace
where databasename = 'UAXA'
and vproc = 4
group by vproc, databasename;
| |