Oracle unable to extend table in tablespace

I've got the next error message from Oracle server, when I try to insert new record:

ORA-01653: unable to extend table OWNER.TABLE_NAME by BYTE in tablespace TABLESPACE

Where TABLESPACE is the name of your tablespace. In the future you need to replace TABLESPACE with name of your tablespace.

If you have enough disk space, you need to check how many bytes are used by Oracle in TABLESPACE:

SELECT *
FROM
   dba_data_files
WHERE
   tablespace_name = 'TABLESPACE';
--Where TABLESPACE is the name of your tablespace.
--Please replace it.

"BYTES" column shows maximum size of this tablespace in bytes. If value of "AUTOEXTENSIBLE" column is NO, then Oracle don't extends the maximum size of tablespace. If this value is YES, then Oracle extends tablespace when no more space in it.

If value of "AUTOEXTENSIBLE" column is NO, check how many bytes are used by Oracle:

SELECT
  tablespace_name,
  SUM(bytes/1024/1024)
FROM
  dba_segments
GROUP BY
  tablespace_name;
--Where TABLESPACE is the name of your tablespace.
--Please replace it.

Now look at your tablespace size. If the different between this value and maximum size is enough small you need to set AUTOEXTENSIBLE to
YES. I have generated a query, what set the YES value with this command:

SELECT
  'alter database datafile '''||
  file_name||
  ''' '||
  ' autoextend on;'
FROM
  dba_data_files
WHERE tablespace_name = 'TABLESPACE';
--Where TABLESPACE is the name of your tablespace.
--Please replace it.

Copy and paste generated query end execute it.

Now your tablespace is AUTOEXTENSIBLE and it will grow if need.

 

来源:http://bitprison.net/oracle_unable_to_extend_tablespace

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值