oracle 无法在撤消表空间“UND_TBS”中将段扩展 8
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24405344/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
unable to extend segment by 8 in undo tablespace 'UND_TBS'
提问by being_uncertain
I'm trying to insert data from table1
to an existing table say table2
.
table1 has 30 million records. Used the below command to insert the data. Got the given error after some time.
我正在尝试将数据插入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'"
It shown that, the specified undo tablespace has no more space available.
它表明, the specified undo tablespace has no more space available.
Before retrying the operation, what can I do. Is there any other workarounds available to insert the data successfully?
在重试操作之前,我可以做什么。是否有任何其他解决方法可用于成功插入数据?
回答by being_uncertain
As @a_horse_with_no_name commented out,
正如@a_horse_with_no_name 所评论的那样,
I have created a new data file keeping the autoextend
on.
我创建了一个新的数据文件,保持autoextend
打开状态。
alter tablespace UND_TBS add datafile '/path/my_data_file.dbf' size 7168M autoextend on;
The path can be identified by,
路径可以通过以下方式识别,
select file_name from dba_data_files where tablespace_name ='UND_TBS';
Ans you can get the maximum/free size of the tablespace by,
您可以通过以下方式获得表空间的最大/可用大小,
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;