Size Database
select sum("tablespace_size(M)"), sum("used_size(M)"), sum("free_size(M)"),
round(sum("used_size(M)")/sum("tablespace_size(M)")*100,2) "used_percentage(%)"
from (
select t2.tablespace_size "tablespace_size(M)",
t2.tablespace_size - nvl(t1.free_size,0) "used_size(M)",
nvl(t1.free_size,0) "free_size(M)",
round((t2.tablespace_size - nvl(t1.free_size,0))*100/t2.tablespace_size,2) "used_percentage(%)"
from dba_tablespaces t0,
(select tablespace_name,round(sum(bytes)/1024/1024) free_size from dba_free_space group by tablespace_name) t1,
(select tablespace_name,round(sum(bytes)/1024/1024) tablespace_size from dba_data_files group by tablespace_name) t2
where t0.tablespace_name = t1.tablespace_name(+) and
t0.tablespace_name = t2.tablespace_name(+) and not
(t0.extent_management like 'LOCAL' and t0.contents like 'TEMPORARY')
union all
select t2.tablespace_size "tablespace_size(M)",
nvl(t1.used_size,0) "used_size(M)",
t2.tablespace_size - nvl(t1.used_size,0) "free_size(M)",
round(nvl(t1.used_size,0)*100/t2.tablespace_size,2) "used_percentage(%)"
from dba_tablespaces t0,
(select tablespace_name,round(sum(bytes_cached)/1024/1024) used_size from v$temp_extent_pool group by tablespace_name) t1,
(select tablespace_name,round(sum(bytes)/1024/1024) tablespace_size from dba_temp_files group by tablespace_name) t2
where t0.tablespace_name = t1.tablespace_name(+) and
t0.tablespace_name = t2.tablespace_name(+) and
t0.extent_management like 'LOCAL' and
t0.contents like 'TEMPORARY');
round(sum("used_size(M)")/sum("tablespace_size(M)")*100,2) "used_percentage(%)"
from (
select t2.tablespace_size "tablespace_size(M)",
t2.tablespace_size - nvl(t1.free_size,0) "used_size(M)",
nvl(t1.free_size,0) "free_size(M)",
round((t2.tablespace_size - nvl(t1.free_size,0))*100/t2.tablespace_size,2) "used_percentage(%)"
from dba_tablespaces t0,
(select tablespace_name,round(sum(bytes)/1024/1024) free_size from dba_free_space group by tablespace_name) t1,
(select tablespace_name,round(sum(bytes)/1024/1024) tablespace_size from dba_data_files group by tablespace_name) t2
where t0.tablespace_name = t1.tablespace_name(+) and
t0.tablespace_name = t2.tablespace_name(+) and not
(t0.extent_management like 'LOCAL' and t0.contents like 'TEMPORARY')
union all
select t2.tablespace_size "tablespace_size(M)",
nvl(t1.used_size,0) "used_size(M)",
t2.tablespace_size - nvl(t1.used_size,0) "free_size(M)",
round(nvl(t1.used_size,0)*100/t2.tablespace_size,2) "used_percentage(%)"
from dba_tablespaces t0,
(select tablespace_name,round(sum(bytes_cached)/1024/1024) used_size from v$temp_extent_pool group by tablespace_name) t1,
(select tablespace_name,round(sum(bytes)/1024/1024) tablespace_size from dba_temp_files group by tablespace_name) t2
where t0.tablespace_name = t1.tablespace_name(+) and
t0.tablespace_name = t2.tablespace_name(+) and
t0.extent_management like 'LOCAL' and
t0.contents like 'TEMPORARY');
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13750068/viewspace-1161571/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- database size increaseDatabase
- Size of the Database Buffer Cache (82)Database
- prepare statement cache size influence databaseDatabase
- user database的initial size和dbcc shrinkfileDatabase
- How To Size the Database Smart Flash Cache (Doc ID 1317950.1)Database
- DB_BLOCK_SIZE and DB_CACHE_SIZE in OracleBloCOracle
- db_recovery_file_dest_size, v$flashback_database_logfile,v$restore_point引發的血案.DatabaseREST
- ORA-27046: file size is not a multiple of logical block sizeBloC
- sort_area_retained_size與sort_area_sizeAI
- Index column size too large. The maximum column size is 767 bytesIndex
- ORA-27092: skgfofi: size of file exceeds file size limit of the processMIT
- Blob size 屬性
- File size 屬性
- CSS background-sizeCSS
- Map size 屬性
- Set size 屬性
- gitignore by file size?Git
- Mysql Key Buffer SizeMySql
- Oracle Log Block SizeOracleBloC
- v$type_size
- oracle stream pool sizeOracle
- Index column size too large. The maximum column size is 767 bytes.Index
- c++: size_type 與 size_t一些概念C++
- [zt] segment size(strip size)對磁碟陣列效能的影響陣列
- tf.data.Dataset.shuffle(buffer_size)中buffer_size的理解
- mysql innodb_log_file_size 和innodb_log_buffer_size引數MySql
- SIZE AUTO和SIZE SKEWONLY在gather_table_stats時的區別
- standby database to primary database.Database
- serveroutput size不夠用Server
- SAP BW:CUBE size 分析
- local + uniform size 設定ORM
- Limiting the Size of the SGA (96)MIT
- SAP Security Audit log size
- CSS:font-size(轉)CSS
- 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- [Err] 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- [譯]Flutter: Widget Size and PositionFlutter