首页 > 数据库技术 > 详细

Oracle基础 02 临时表空间 temp

时间:2017-02-04 14:54:59      阅读:283      评论:0      收藏:0      [点我收藏+]

--查看临时文件的使用/剩余空间

SQL> select * from v$temp_space_header;


--查看SCOTT用户所属的临时表空间 

SQL> select username ,temporary_tablespace from dba_users

     where username=‘SCOTT‘;  
  

--查看当前有那些临时文件 

SQL> select tablespace_name,file_name,bytes/1024/1024 total_M from dba_temp_files;
    
--重新建立一个临时表空间

SQL> create temporary tablespace temp1 
   tempfile ‘/u01/app/oracle/oradata/test10g/temp101.dbf‘ size 100M ;


--添加一个临时表空间文件

SQL> alter tablespace temp add tempfile ‘/u01/app/oracle/oradata/test10g/temp02.dbf‘ size 100M;


--将建好的TEMP1表空间设置为数据库默认的临时表空间

SQL> alter database default temporary tablespace temp1;


--DROP掉旧的TEMP的表空间 

SQL> drop tablespace temp including contents and datafiles;

Oracle基础 02 临时表空间 temp

原文:http://www.cnblogs.com/john2017/p/6364425.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!