Display Storage Map for Database | Tablespace | Datafile Storage_1377458.1
How to Display Storage Map for Database | Tablespace | Datafile Storage (Doc ID 1377458.1)
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]Information in this document applies to any platform. PurposeThis note will present a set of steps by which a map of used and free space can be displayed for one or more tablespaces / datafiles RequirementsAny command line interface (SQLPLUS .. ISQLPLUS etc) ConfiguringExecuting user must have been granted access to DBA_FREE_SPACE and DBA_EXTENTS Instructions
1) Create a 'holding table' table called SPACE_MAP Caution
This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.
Script
-- Create a 'holding table' table called SPACE_MAP Sample Output
TABLESPACE EXAMPLE select FILE_NO FILE#, TBLSP_NAME TABLESPACE, BEGIN_BLOCK BEGIN, END_BLOCK END, SEGMENT_NAME NAME, CHUNK_TYPE TYPE from SPACE_MAP where TBLSP_NAME = 'USERS' order by FILE_NO, BEGIN_BLOCK; FILE# TABLESPACE BEGIN END NAME TYPE ----- ---------- -------- -------- -------------------- ------------ 4 USERS 128 135 DEAN.ID_IND INDEX 4 USERS 136 143 DEAN.ID_IND INDEX 4 USERS 144 151 .... 4 USERS 256 263 TEST.SPACE_MAP TABLE 4 USERS 264 271 TEST.SPACE_MAP TABLE 4 USERS 272 279 TEST.SPACE_MAP TABLE 4 USERS 312 12799
select FILE_NO FILE#, TBLSP_NAME TABLESPACE, BEGIN_BLOCK BEGIN, END_BLOCK END, SEGMENT_NAME NAME, CHUNK_TYPE TYPE from SPACE_MAP where FILE_NO = 3 order by BEGIN_BLOCK; FILE# TABLESPACE BEGIN END NAME TYPE ----- ---------- -------- -------- ------------------------------ ------------ 3 UNDOTBS1 9984 10111 SYS._SYSSMU10_16154620$ TYPE2 UNDO 3 UNDOTBS1 10112 10239 SYS._SYSSMU2_3913496631$ TYPE2 UNDO 3 UNDOTBS1 10240 10367 SYS._SYSSMU2_3913496631$ TYPE2 UNDO 3 UNDOTBS1 10368 10495 SYS._SYSSMU9_2823258255$ TYPE2 UNDO ... 3 UNDOTBS1 24192 24703 3 UNDOTBS1 24704 24831 SYS._SYSSMU10_16154620$ TYPE2 UNDO 3 UNDOTBS1 24832 25471 3 UNDOTBS1 25472 25599 SYS._SYSSMU10_16154620$ TYPE2 UNDO
select FILE_NO FILE#, TBLSP_NAME TABLESPACE, BEGIN_BLOCK BEGIN, END_BLOCK END, SEGMENT_NAME NAME, CHUNK_TYPE TYPE from SPACE_MAP order by TBLSP_NAME, FILE_NO, BEGIN_BLOCK; FILE# TABLESPACE BEGIN END NAME TYPE ----- ---------- -------- -------- ------------------------------ ------------ 2 SYSAUX 128 135 SYS.SQLLOG$_PKEY INDEX 2 SYSAUX 136 143 SYS.SMB$CONFIG TABLE 2 SYSAUX 144 151 SYS.I_SMB$CONFIG_PKEY INDEX ... 1 SYSTEM 128 135 SYS.SYSTEM ROLLBACK 1 SYSTEM 136 143 SYS.SYSTEM ROLLBACK 1 SYSTEM 144 151 SYS.C_OBJ# CLUSTER ... 3 UNDOTBS1 128 135 SYS._SYSSMU1_1002995750$ TYPE2 UNDO 3 UNDOTBS1 136 143 SYS._SYSSMU8_4175155633$ TYPE2 UNDO 3 UNDOTBS1 144 151 SYS._SYSSMU2_3913496631$ TYPE2 UNDO ... 4 USERS 128 135 DEAN.ID_IND INDEX 4 USERS 136 143 DEAN.ID_IND INDEX 4 USERS 144 151 4 USERS 152 159 TEST.TRACKING TABLE ... |
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1411348/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter database datafile offline and alter database tablespace ...offlineDatabase
- alter database datafile offline drop 與 alter tablespace drop datafile 區別Database
- alter database drop datafile 與 drop tablespace file 的區別Database
- 冷備手工完全恢復(recover database,recover tablespace,recover datafile)Database
- Database StorageDatabase
- alter database create datafileDatabase
- alter database create datafile '' as ''Database
- Renaming a Datafile in the Primary DatabaseDatabase
- tablespace和datafile之間的關係
- oracle實用sql(6)--tablespace/datafile resizeOracleSQL
- ALTER DATABASE DATAFILE OFFLINEDatabase
- 【PingCAP】Database Storage EngineerPingCAPDatabase
- tablespace offline與datafile offline 區別
- 【Oracle】oracle tablespace&datafile -- oracle表空間 分享[轉]Oracle
- oracle 10g_rac_create tablespace_add_datafileOracle 10g
- alter database ... create datafile的原理及用途Database
- alter database datafile 4 offline drop;Database
- rman restore database(spfile,controlfile, datafile)RESTDatabase
- 恢復一則 alter database create datafile '' as ''Database
- Rename Tablespace in Oracle database 10gOracleDatabase
- How to Move or Copy a Tablespace to Another Database (61)Database
- tablespace offline 和datafile offline的區別
- Alter database datafile resize ORA-03297 原因解析Database
- UNRECOVERABLE DATAFILE clause in the ALTER DATABASE CLEAR LOGFILE statementDatabase
- Tablespace Management Enhancements in Oracle Database 10gOracleDatabase
- 重建控制檔案與 datafile offline,tablespace read only
- datafile offline 與alter tablespace offline 的區別
- 檢視資料庫中tablespace和datafile的使用情況。資料庫
- alter database datafile .... offline drop的問題Database
- How to release space from database( in other words: resize datafile ) (zt)Database
- How to release space from database( in other words: resize datafile ) 【zt】Database
- FLASHBACK DATABASE可以恢復刪除的TABLESPACEDatabase
- VMS: ALTER TABLESPACE/DATABASE TO RENAME FILES on VMS [ID 9560.1]Database
- oracle裡tablespace offline和datafile offline的區別Oracle
- alter database datafile offline drop相關問題Database
- recover database delete archivelogs skip tablespace temp;報錯DatabasedeleteHive
- cmu15545-資料儲存(Database Storage)Database
- ALTER DATABASE 與 ALTER TABLESPACE OFFLINE的區別Database