解决oralce10g临时表空间不断变大的问题

因为10g没有11g收缩空间的功能,所以temp空间,会累计增加,虽然oracle回收,但是,仍然很不理想,我们的/opt/ora10/oradata/xxx/temp01.dbf文件仍然增加到了32G,下面用重新建立空间和切换空间的过程,处理临时空间

下面的方法,可以在线解决不用shutdown 数据库,不过尽量避免过多操作尤其是imp或exp。

 1.查看数据库默认表空间和大小

select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';

select file_name,tablespace_name,bytes/1024/1024 "MB",autoextensible from dba_temp_files;

确认 temp 空间和大小

2.创建新的临时表空间

  因为临时切换,不用太大空间

create temporary tablespace temp02   tempfile '/opt/ora10/oradata/xxx/temp02.dbf' size 512M;

3.修改 temp02  为数据库的默认临时表空间

 alter database default temporary tablespace temp02;

4.删除temp临时表空间

drop tablespace temp including contents and datafiles;

5.重新创建temp临时表空间

create temporary tablespace temp  tempfile '/opt/ora10/oradata/xxx/temp01.dbf'  size 512M autoextend on maxsize 10G;

6.重新把新建的temp临时表空间切换成默认临时表空间

alter database default temporary tablespace temp;

7.删除temp02临时表空间

drop tablespace temp02 including contents and datafiles;


  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值