If you use auto extending table-spaces in your Oracle environment and use Grid Control to monitor them, you will know that it does not take the auto extension into account. The following script will give you a breakout of your TS usage including the auto extension.
============================================================
set pagesize 1000
set lines 200
col tablespace_name format a32 head 'Tablespace|Name'
col total format 999.99 head 'Total(GB)'
col used format 999.99 head 'Used(GB)'
col free format 999.99 head 'Free(GB)'
col pct format 999 head 'Pct|Used'
col next_extent format 999,999 head 'Next|Extent(KB)'
col Contents format a4 head 'Cont'
col Logging format a3 head 'Log'
col Extent_Management format a3 head 'Ext|Mgt'
col Allocation_Type format a5 head 'Alloc|Type'
SELECT inn1.tablespace_name tbs_name
,ROUND(inn1.total/1024,2) TOTAL_SPACE_GB
,ROUND((inn1.total-inn1.allocated+NVL(inn2.free,0))/1024,2) FREE_SPACE_GB
,ROUND((inn1.allocated-NVL(inn2.free,0))/1024,2) USED_SPACE_GB
,ROUND(((inn1.allocated-NVL(inn2.free,0))/inn1.total)*100) USED_PERCENT
FROM
(select tablespace_name,SUM(bytes)/1024/1024 allocated,SUM(DECODE(autoextensible,'YES',maxbytes,bytes))/1024/1024 total
FROM dba_data_files
GROUP BY tablespace_name) inn1,
(SELECT tablespace_name, NVL(SUM(bytes)/1024/1024,0) free
FROM dba_free_space
GROUP BY tablespace_name) inn2
WHERE inn1.tablespace_name= inn2.tablespace_name(+)
and inn1.tablespace_name = '&tbsname' ;
SELECT file_name, tablespace_name, round(bytes / 1073741842,2) SIZE_GB, autoextensible, (increment_by * 32768) / 1048576 increment_MB, maxbytes / 1073741824 max_size_GB FROM dba_data_files WHERE tablespace_name = '&tbsname';
============================================================
set pagesize 1000
set lines 200
col tablespace_name format a32 head 'Tablespace|Name'
col total format 999.99 head 'Total(GB)'
col used format 999.99 head 'Used(GB)'
col free format 999.99 head 'Free(GB)'
col pct format 999 head 'Pct|Used'
col next_extent format 999,999 head 'Next|Extent(KB)'
col Contents format a4 head 'Cont'
col Logging format a3 head 'Log'
col Extent_Management format a3 head 'Ext|Mgt'
col Allocation_Type format a5 head 'Alloc|Type'
SELECT inn1.tablespace_name tbs_name
,ROUND(inn1.total/1024,2) TOTAL_SPACE_GB
,ROUND((inn1.total-inn1.allocated+NVL(inn2.free,0))/1024,2) FREE_SPACE_GB
,ROUND((inn1.allocated-NVL(inn2.free,0))/1024,2) USED_SPACE_GB
,ROUND(((inn1.allocated-NVL(inn2.free,0))/inn1.total)*100) USED_PERCENT
FROM
(select tablespace_name,SUM(bytes)/1024/1024 allocated,SUM(DECODE(autoextensible,'YES',maxbytes,bytes))/1024/1024 total
FROM dba_data_files
GROUP BY tablespace_name) inn1,
(SELECT tablespace_name, NVL(SUM(bytes)/1024/1024,0) free
FROM dba_free_space
GROUP BY tablespace_name) inn2
WHERE inn1.tablespace_name= inn2.tablespace_name(+)
and inn1.tablespace_name = '&tbsname' ;
SELECT file_name, tablespace_name, round(bytes / 1073741842,2) SIZE_GB, autoextensible, (increment_by * 32768) / 1048576 increment_MB, maxbytes / 1073741824 max_size_GB FROM dba_data_files WHERE tablespace_name = '&tbsname';
Jadwal Tarung Ayam SV388 17 Februari 2019 di Situs Judi Sabung Ayam Online Melalui Agen Resmi Taruhan Sabung Ayam Live Asli Thailand.
ReplyDeleteBandar Sabung Ayam - Minggu, 17 Februari 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.
Untuk Info Lebih Lanjut Bisa Hub kami Di :
wechat : bolavita
line : cs_bolavita
whatsapp : +628122222995
BBM: BOLAVITA
Jadwal Arena Sabung Ayam SV388 28 Februari 2019 - Kamis, Maluku 28 Februari 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.
ReplyDeleteSitus Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.
Untuk Info Lebih Lanjut Bisa Hub kami Di :
wechat : bolavita
line : cs_bolavita
whatsapp : +628122222995
BBM: BOLAVITA
Hello Everybody,
ReplyDeleteMy name is Mrs Sharon Sim. I live in Singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of $250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of $250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius, call/whats-App Contact Number +918929509036 via email:(urgentloan22@gmail.com) Thank you.