无法在指定的表空间中为索引段分配所需块数的范围

时间:2014-03-28 10:08:09

标签: sql oracle indexing alter

我尝试按如下方式运行存储过程,

insert into process_state_archive select * from process_state 
where tstamp BETWEEN trunc(ADD_MONTHS(SYSDATE, -12)) AND trunc(ADD_MONTHS(SYSDATE, -3))

得到以下错误:

Error report:
SQL Error: ORA-01654: Kan index WEBDEV.PROCESS_STAT_TSTAMP_ACTION niet uitbreiden met 8 in     tabelruimte USERS.
01654. 00000 -  "unable to extend index %s.%s by %s in tablespace %s"
*Cause:    Failed to allocate an extent of the required number of blocks for
       an index segment in the tablespace indicated.
*Action:   Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
       files to the tablespace indicated.

但是昨天我能够毫无错误地运行程序。

任何人都可以告诉我上述错误的解决方法吗?

1 个答案:

答案 0 :(得分:6)

您的USERS表空间已满。您可以通过丢弃某些东西(可能是旧对象)来释放一些空间 - 如果这是特定的开发环境,请查看您是否在the recycle bin中累积旧对象并清除任何不再需要的对象

如果您无法为任何空间付费,那么您需要执行错误消息告诉您要做的事情,向表空间添加其他数据文件,或者增加现有数据文件的大小,假设您有足够的磁盘空间。

文档has a section about managing data files,包括adding data fileschanging the size of existing data files。适当的操作取决于您的具体情况,您需要确定适合的尺寸。您可能还需要考虑为应用程序创建新的专用表空间,而不是使用USERS表空间,但同样取决于您的具体情况和需求。