Oracle: To get datafile usage

 column tsname       format a20         heading 'Tablespace Name'

column flname       format a70         heading 'Filename'

column siz          format 999,999,990 heading 'File Size|(MB)'

column maxsiz       format 999,999,990 heading 'Max Size|(MB)'

column pctmax       format 990         heading 'Pct|Max'


set linesize  1000

set trimspool on

set pagesize  32000

set verify    off

set feedback  off


PROMPT

PROMPT ***********************

PROMPT *** DATAFILE STATUS ***

PROMPT ***********************


select file_name                                          flname

,      tablespace_name                                    tsname

,      bytes/1024/1024                                    siz

,      decode(maxbytes,0,0,maxbytes/1024/1024)            maxsiz

,      decode(maxbytes,0,0,bytes/maxbytes*100)            pctmax

from   dba_data_files

-- from   dba_temp_files

-- where tablespace_name in ('TEMP','USERS','SYSTEM','UNDOTBS1','SYSAUX','PSTEMP','PSDEFAULT')

where tablespace_name ='MDMWORK_DATA'

Comments

Popular posts from this blog

Postgres: Clean up stopped replication slot