锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

ORA-01652 无法通过 128 (在表空间 TEMP 中) 扩展 temp 段

时间:2022-11-08 14:30:00 stps10l40ct二三极管

--包括临时表空间利用率
select * from (
Select a.tablespace_name,
to_char(a.bytes/1024/1024,'99,999.999') total_bytes,
to_char(b.bytes/1024/1024,'99,999.999') free_bytes,
to_char(a.bytes/1024/1024 - b.bytes/1024/1024,'99,999.999') use_bytes,
to_char((1 - b.bytes/a.bytes)*100,'99.99') || '%' use
from (select tablespace_name,
sum(bytes) bytes
from dba_data_files
group by tablespace_name) a,
(select tablespace_name,
sum(bytes) bytes
from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name
union all
select c.tablespace_name,
to_char(c.bytes/1024/1024,'99,999.999') total_bytes,
to_char( (c.bytes-d.bytes_used)/1024/1024,'99,999.999') free_bytes,
to_char(d.bytes_used/1024/1024,'99,999.999') use_bytes,
to_char(d.bytes_used*100/c.bytes,'99.99') || '%' use
from
(select tablespace_name,sum(bytes) bytes
from dba_temp_files group by tablespace_name) c,
(select tablespace_name,sum(bytes_cached) bytes_used
from v$temp_extent_pool group by tablespace_name) d
where c.tablespace_name = d.tablespace_name
)
order by tablespace_name;


--登陆服务器

>- su - oracle


--释放临时表空间
SQL>-alter tablespace temp shrink space KEEP 400M;


---注意,您可以检查以前的统计信息是否错误,并打开一个commd 窗口,执行
SELECT 'EXEC DBMS_STATS.GATHER_TABLE_STATS(''ETL_TEMP||TABLE_NAME|| FROM DBA_TABLES T WHERE T.OWNER='ETL_TEMP'

锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章