Oracle 临时表空间的学习知识点

 临时表空间
 用于大数量排序
  create temporary tablespace tbstemp
  datafile '$ORACLE_HOME/oradata/tbstmp01.dbf' size 50M
  Size 5M
  extent management local
  uniform size 1m;
  
  查看临时表空间
 select * from v$tempfile f,v$tablespace t
where t.ts#=f.ts#
 
 特点:不能设置为只读。
       为nologging.
          不能用alter database 修改临时文件。
        介质恢复是不需要临时文件。
      以只读方式运行的数据库需要临时数据文件。
默认临时表空间
      从默认临时表空间在Oracle 9i开始引入,如果在创建一个数据库是没有设置默认的临时表空间,那么任何一个用户在创建它是没有使用
temporary tablespace 子句,那么将采用system表空间作为排序区。这将是system表空间碎片化,从而降低数据库系统的效率。

查看默认的表空间
select * from database_properties p
where p.property_name like 'DEFAULT%';

设置默认的表空间
alter database default temporary tablespace temp;

 

你可能感兴趣的:(oracle)