Tablespace Space Script
The Script. to Query the Status of Tablespace:
--------------------------------------------------------------
select d.tp_name "tbs_name",e.contents "type",e.status "status", e.extent_management "seg_m",
b.bytes "size(M)", b.bytes-d.bytes "used(M)", d.bytes "free(M)", round((b.bytes-d.bytes)*100/b.bytes,2) "used_per"
from (select c.tablespace_name tp_name,round(sum(c.bytes)/1024/1024,2) bytes
from dba_free_space c
group by c.tablespace_name) d,
(select a.tablespace_name tp_name,round(sum(a.bytes)/1024/1024) bytes
from dba_data_files a
group by a.tablespace_name) b,
(select tablespace_name tp_name,contents,status,extent_management
from dba_tablespaces ) e
where d.tp_name=b.tp_name and d.tp_name=e.tp_name
order by 1;
--------------------------------------------------------------
select d.tp_name "tbs_name",e.contents "type",e.status "status", e.extent_management "seg_m",
b.bytes "size(M)", b.bytes-d.bytes "used(M)", d.bytes "free(M)", round((b.bytes-d.bytes)*100/b.bytes,2) "used_per"
from (select c.tablespace_name tp_name,round(sum(c.bytes)/1024/1024,2) bytes
from dba_free_space c
group by c.tablespace_name) d,
(select a.tablespace_name tp_name,round(sum(a.bytes)/1024/1024) bytes
from dba_data_files a
group by a.tablespace_name) b,
(select tablespace_name tp_name,contents,status,extent_management
from dba_tablespaces ) e
where d.tp_name=b.tp_name and d.tp_name=e.tp_name
order by 1;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-312613/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [Oracle Script] check tablespace usage infoOracle
- [Oracle Script] check temp tablespace usageOracle
- Run Out Of Space On UNDO Tablespace Using DataPump Import/ExportImportExport
- Script to Detect Tablespace Fragmentation [ID 1020182.6]Fragment
- Script to Report Extents and Contiguous Free Space (Doc ID 162994.1)
- ORA-01536: space quota exceeded for tablespace 錯誤的深入分析
- tablespace 大檔案,undo,temp tablespace
- Script
- 請說說`<script>`、`<script async>`和`<script defer>`的區別
- db2 sms tablespace 不支援large tablespaceDB2
- Hilbert Space
- Script Browser & Script Analyzer 1.3更新發布
- Shell Script
- shell script
- oracle scriptOracle
- script win
- bat scriptBAT
- remap_tablespaceREM
- The SYSAUX Tablespace (40)UX
- 查詢tablespace實際使用量與剩餘空間(free space)以及db或table實際資料量問題
- No space left on devicedev
- [Oracle] 檢視tablespace的使用率(Including temp tablespace)Oracle
- script標籤
- [Oracle Script] LockOracle
- Cold backup script
- Oracle Database ScriptOracleDatabase
- tom's script
- Shell Script(轉)
- Master Note for Tablespace IssuesAST
- TRANSPORT TABLESPACE總結
- Tablespace Repository (60)
- show_space.sqlSQL
- Oracle DBMS_SPACEOracle
- space.itpub印象
- QlikView Script – 進階篇1 Script呼叫Macro之變化ViewMac
- MySQL Server Startup ScriptMySqlServer
- npm script中&&和&NPM
- Elasticsearch script sort 排序Elasticsearch排序