programmera.net -> oracledba -> normal för utskrift | info@programmera.net |
DBA_TABLESPACES
1. DBA_TABLESPACES 2. Exempel 1: Status 3. Exempel 2: Extent |
1. DBA_TABLESPACES
DBA_TABLESPACES visar information om alla tabellutrymmen i databasen. Vi har följande kolumner:
SQL> DESC dba_tablespaces;
Name Null? Type
----------------------------------------- -------- -----------------------
TABLESPACE_NAME NOT NULL VARCHAR2(30)
BLOCK_SIZE NOT NULL NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NOT NULL NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
MIN_EXTLEN NUMBER
STATUS VARCHAR2(9)
CONTENTS VARCHAR2(9)
LOGGING VARCHAR2(9)
FORCE_LOGGING VARCHAR2(3)
EXTENT_MANAGEMENT VARCHAR2(10)
ALLOCATION_TYPE VARCHAR2(9)
PLUGGED_IN VARCHAR2(3)
SEGMENT_SPACE_MANAGEMENT VARCHAR2(6)
DEF_TAB_COMPRESSION VARCHAR2(8)
RETENTION VARCHAR2(11)
BIGFILE VARCHAR2(3)
2. Exempel 1: Status
Under installationen (av Oracle 10gR2) skapades följande tabellutrymmen:
Kolumnerna har följande innebörd:
SQL> SELECT tablespace_name, contents, bigfile, block_size, status,
2 logging, force_logging
3 FROM dba_tablespaces;
TABLESPACE_NAME CONTENTS BIG BLOCK_SIZE STATUS LOGGING FOR
-------------------- --------- --- ---------- --------- --------- ---
SYSTEM PERMANENT NO 16384 ONLINE LOGGING NO
UNDOTBS1 UNDO NO 16384 ONLINE LOGGING NO
SYSAUX PERMANENT NO 16384 ONLINE LOGGING NO
TEMP TEMPORARY NO 16384 ONLINE NOLOGGING NO
APP1_DATA01 PERMANENT NO 16384 ONLINE LOGGING NO
APP1_IDX01 PERMANENT NO 16384 ONLINE LOGGING NO
6 rows selected.
3. Exempel 2: Extent
Följande kolumner beskriver hur tabellutrymmena (för Oracle 10gR2) utnyttjar extent:
Kolumnerna har följande innebörd:
SQL> SELECT tablespace_name, extent_management, allocation_type,
2 initial_extent, next_extent, min_extents, max_extents
3 FROM dba_tablespaces;
TABLESPACE_NAME EXTENT_MAN ALLOCATIO INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS
-------------------- ---------- --------- -------------- ----------- ----------- -----------
SYSTEM LOCAL SYSTEM 65536 1 2147483645
UNDOTBS1 LOCAL SYSTEM 65536 1 2147483645
SYSAUX LOCAL SYSTEM 65536 1 2147483645
TEMP LOCAL UNIFORM 1048576 1048576 1
APP1_DATA01 LOCAL SYSTEM 65536 1 2147483645
APP1_IDX01 LOCAL SYSTEM 65536 1 2147483645
6 rows selected.