oracle ORA-01658: 无法为表空间 TS_DATA 中的段创建初始范围

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37071152/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 01:05:39  来源:igfitidea点击:

ORA-01658: unable to create INITIAL extent for segment in tablespace TS_DATA

oracleselectdatabase-administrationtablespace

提问by Andrew

When i tried to create a table in my User_DB schema i am getting an error as ORA-01658: unable to create INITIAL extent for segment in tablespace TS_DATA. I run the following query to get all the TABLESPACE_NAME:

当我尝试在我的 User_DB 模式中创建一个表时,我收到一个错误为ORA-01658: unable to create INITIAL extent for segment in tablespace TS_DATA. 我运行以下查询以获取所有TABLESPACE_NAME

SELECT * FROM DBA_DATA_FILES;

But i really dont know which tablespace i am using and how to extend the tablespace to solve this issue.

但我真的不知道我正在使用哪个表空间以及如何扩展表空间来解决这个问题。

回答by Mureinik

As the error message indicates, you're using the TS_DATAtablespace. You can extend it by either enlarging one of the existing data files:

正如错误消息所示,您正在使用TS_DATA表空间。您可以通过放大现有数据文件之一来扩展它:

ALTER DATABASE 
DATAFILE 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\TS_DATA.DBF' 
RESIZE 3000M;

Or by adding a second datafile to the tablespace:

或者通过向表空间添加第二个数据文件:

ALTER TABLESPACE ts_data 
ADD DATAFILE 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\TS_DATA2.DBF' 
SIZE 1000M;

Or just allow the datafile to auto extend:

或者只允许数据文件自动扩展:

ALTER DATABASE 
DATAFILE 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\TS_DATA2.DBF'
AUTOEXTEND ON
MAXSIZE UNLIMITED; -- Or some reasonable cap