programmera.net -> oracledba -> normal för utskrift | info@programmera.net |
DBA_DATA_FILES
1. DBA_DATA_FILES 2. Exempel 1: Status 3. Exempel 2: Expansion |
1. DBA_DATA_FILES
DBA_DATA_FILES visar information om alla datafiler i databasen:
SQL> DESC dba_data_files
Name Null? Type
----------------------------------------- -------- ----------------------------
FILE_NAME VARCHAR2(513)
FILE_ID NUMBER
TABLESPACE_NAME VARCHAR2(30)
BYTES NUMBER
BLOCKS NUMBER
STATUS VARCHAR2(9)
RELATIVE_FNO NUMBER
AUTOEXTENSIBLE VARCHAR2(3)
MAXBYTES NUMBER
MAXBLOCKS NUMBER
INCREMENT_BY NUMBER
USER_BYTES NUMBER
USER_BLOCKS NUMBER
ONLINE_STATUS VARCHAR2(7)
2. Exempel 1: Status
Min installation (Oracle 10gR2) skapades med följande datafiler:
Kolumnerna har följande innebörd:
SQL> SELECT tablespace_name, file_name, status, online_status, bytes, user_bytes
2 FROM dba_data_files;
TABLESPACE_NAME FILE_NAME STATUS ONLINE_ BYTES USER_BYTES
---------------- ---------------------------------------- --------- ------- ---------- ----------
SYSTEM /u04/oradata/orcl/system01.dbf AVAILABLE SYSTEM 503316480 503250944
UNDOTBS1 /u06/oradata/orcl/undotbs01.dbf AVAILABLE ONLINE 209715200 209649664
SYSAUX /u04/oradata/orcl/sysaux01.dbf AVAILABLE ONLINE 450887680 450822144
APP1_DATA01 /u07/oradata/orcl/app1_data01.dbf AVAILABLE ONLINE 5242880 5177344
APP1_IDX01 /u08/oradata/orcl/app1_idx01.dbf AVAILABLE ONLINE 5242880 5177344
3. Exempel 2: Expansion
Följande kolumner beskriver hur datafilerna (för Oracle 10gR2) expanderar:
Kolumnerna har följande innebörd:
SQL> SELECT tablespace_name, file_name, autoextensible, increment_by, maxbytes
2 FROM dba_data_files;
TABLESPACE_NAME FILE_NAME AUT INCREMENT_BY MAXBYTES
---------------- ---------------------------------------- --- ------------ ----------
SYSTEM /u04/oradata/orcl/system01.dbf YES 640 6,8719E+10
UNDOTBS1 /u06/oradata/orcl/undotbs01.dbf YES 320 6,8719E+10
SYSAUX /u04/oradata/orcl/sysaux01.dbf YES 640 6,8719E+10
APP1_DATA01 /u07/oradata/orcl/app1_data01.dbf NO 0 0
APP1_IDX01 /u08/oradata/orcl/app1_idx01.dbf NO 0 0