我正在尝试将table1中的数据插入到现有的表中,例如table2.
table1有3000万条记录.使用以下命令插入数据.一段时间后得到了给定的错误.
insert into TABLE2 (select * from TABLE1) Error at Command Line:31 Column:0 Error report: SQL Error: ORA-30036: unable to extend segment by 8 in undo tablespace 'UND_TBS' 30036. 00000 - "unable to extend segment by %s in undo tablespace '%s'"
它表明,指定的undo表空间没有更多可用空间.
在重试操作之前,我该怎么办.是否有其他可用于成功插入数据的变通方法?
解决方法
如
@a_horse_with_no_name commented out,
我创建了一个新的数据文件,保持自动扩展.
alter tablespace UND_TBS add datafile '/path/my_data_file.dbf' size 7168M autoextend on;
路径可以通过以下方式识别:
select file_name from dba_data_files where tablespace_name ='UND_TBS';
你可以获得表空间的最大/自由大小,
SELECT b.tablespace_name,tbs_size SizeMb,a.free_space FreeMb FROM (SELECT tablespace_name,ROUND(SUM(bytes)/1024/1024,2) AS free_space FROM dba_free_space GROUP BY tablespace_name ) a,(SELECT tablespace_name,SUM(bytes)/1024/1024 AS tbs_size FROM dba_data_files GROUP BY tablespace_name ) b WHERE a.tablespace_name(+)=b.tablespace_name;