加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle10g – ORA-01652无法在表空间中扩展临时段

发布时间:2020-12-12 13:49:06 所属栏目:百科 来源:网络整理
导读:我正在创建一个桌子 create table tablenameasselect * for table2 我收到错误 ORA-01652 Unable to extend temp segment by in tablespace 当我googled我通常发现ORA-01652错误显示一些值 Unable to extend temp segment by 32 in tablespace 我没有得到任
我正在创建一个桌子
create table tablename
as
select * for table2

我收到错误

ORA-01652 Unable to extend temp segment by in tablespace

当我googled我通常发现ORA-01652错误显示一些值

Unable to extend temp segment by 32 in tablespace

我没有得到任何这样的价值.我运行这个查询

select 
   fs.tablespace_name                          "Tablespace",(df.totalspace - fs.freespace)              "Used MB",fs.freespace                                "Free MB",df.totalspace                               "Total MB",round(100 * (fs.freespace / df.totalspace)) "Pct. Free" 
from 
   (select 
      tablespace_name,round(sum(bytes) / 1048576) TotalSpace 
   from 
      dba_data_files 
   group by 
      tablespace_name 
   ) df,(select 
      tablespace_name,round(sum(bytes) / 1048576) FreeSpace 
   from 
      dba_free_space 
   group by 
      tablespace_name 
   ) fs 
where 
   df.tablespace_name = fs.tablespace_name;

取自:Find out free space on tablespace

我发现我目前使用的tablespace具有大约32Gb的可用空间.我甚至尝试创建表

create table tablename tablespace tablespacename
as select * from table2

但我再次收到相同的错误.任何人都可以给我一个想法,问题在哪里,如何解决.对于您的信息,select语句将获取40,000,000条记录.

我找到了解决方案.有一个名为TEMP的临时表空间,由数据库内部用于诸如distinct,join等操作.由于我的查询(有4个连接)提取了近5000万条记录,所以TEMP表空间没有足够的空间来占用所有数据.因此,即使我的表空间具有可用空间,查询失败.因此,在增加了TEMP表空间的大小后,问题已经解决.希望这可以帮助有同样问题的人.谢谢 :)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读