处理docker 里面Oralce 临时表过大问题

1. 查看临时表占用内存

#登录账号
sqlplus / as sysdba
#查一下临时表大小记录一下临时表位置
select d.file_name, d.file_id, d.tablespace_name, d.bytes/1024/1024/1024 as GB from dba_temp_files d;

在这里插入图片描述

2.创建新临时表temp2

# 创建新临时表
create temporary tablespace temp2
       tempfile '/home/oracle/app/oracle/oradata/helowin/temp02.dbf' size 512M reuse
       autoextend on next 640k maxsize unlimited;

2.更改数据库默认表空间为temp2

alter database default temporary tablespace temp2;

3. 删除过大的数据文件存在的表空间temp及数据文件TEMP01.DBF

drop tablespace temp including contents and datafiles;

4.再创建空的新临时表空间temp

create temporary tablespace temp
       tempfile '/home/oracle/app/oracle/oradata/helowin/temp01.dbf' size 512M reuse
       autoextend on next 640K maxsize unlimited;

5. 改temp 为默认临时表并且删除 temp2

alter database default temporary tablespace temp; 
drop tablespace temp2 including contents and datafiles;  

在这里插入图片描述
最后查一下大小,好了

select d.file_name, d.file_id, d.tablespace_name, d.bytes/1024/1024/1024 as GB from dba_temp_files d;

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值