數(shù)據(jù)庫由若干表空間tablespace組成,tablespace由若干段segment組成,segment由若干區(qū)extent組成,extent又由oracle最小單元塊block組成的。 1、表空間: 1)普通數(shù)據(jù)表空間: create tablespace TBS_LJB;(注意:創(chuàng)建表空間前,要確保有數(shù)據(jù)文件datafile,若無,可百度查找相關(guān)操作) select file_name,tablespace_name,autoextensible,bytes from dba_data_files where tablespace_name = 'TBS_LJB' order by substr(file_name,-12); 2)臨時表空間: create temporary tablespace temp_ljb; select file_name,tablespace_name,bytes,autoextensible from dba_temp_files where tablespace_name = 'TEMP_LJB'; 3)回滾段表空間: create undo tablespace undotbs2; select file_name,tablespace_name,autoextensible.bytes/1024/1024 from dba_data_files where tablespace_name = 'UNDOTBS2' order by substr(file_name,-12); 4)系統(tǒng)表空間: select file_name ,tablespace_name,autoextensible.bytes/1024/1024 from dba_data_files where tablespace_name like 'SYS%' order by substr(file_name,-12);
|
|