Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: get space used by tablespace?
In article <36EE7C71.FCFCF35_at_psi.de>,
"Dr. Jan Dieckmann" <JDieckmann_at_psi.de> wrote:
> Hi Mary,
>
> It makes sense. There are views in the Oracle dictionary (dba_tablespaces,
> dba_extents ...) which shows the information. But this is not very
comfortable.
> Try a tool like Hora 3 - see the page "Tablespaces" and the tabregister
> "Segments/Extents". You select the tablespace and the owner and Hora 3 will
show
> the tables ... ordered by name or Size or NumberOfExtents ...
>
> See http:\\www.keeptool.com for a free trialversion of Hora 3.
>
Try this,
SELECT d.file_name "Name",d.tablespace_name "Tablespace",
v.status "Status", TO_CHAR((d.bytes / 1024 / 1024), '99999990.000')
"Size (M)",
NVL(TO_CHAR(((d.bytes - SUM(s.bytes)) / 1024 / 1024), '99999990.000'),
TO_CHAR((d.bytes / 1024 / 1024),'99999990.000')) "Used (M)"
FROM sys.dba_data_files d,sys.dba_free_space s, sys.v_$datafile v
WHERE (s.file_id (+)= d.file_id) AND (d.file_name = v.name)
GROUP BY d.tablespace_name,d.file_name, v.status, d.bytes
/
-rat
> regards Jan Dieckmann
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Mar 16 1999 - 14:35:47 CST