ORA-01653: unable to extend table XXXX by 8497 in tablespace DAT

insert into cat_tran_histories
            *
ERROR at line 1:
ORA-01653: unable to extend table CAT_TRAN_HISTORIES by 8497 in
tablespace DAT

when executing :insert into cat_tran_histories  select * from cat_transactions ;

简单的insert 语句,直接在SQL navigator 可以操作,在程序中执行就出这错?怎么解决?谢谢



**表空间DAT 扩展失败.......

使用“ALTER TABLESPACE ADD DATAFILE”命令增加文件系统文件和原始分区,或者增加INITIAL的大小(如:alter tablespace CDRS101 default storage(next 500M pctincrease 1))应该能够解决,否则就是有人使用你的表空间上创建了一个比较大的数据文件导致你的表空间不够用。


**看看表空间的利用情况,用下面的查询:
COLUMN "Tablespace" format a13
COLUMN "Used MB"    format 99,999,999
COLUMN "Free MB"    format 99,999,999
COLUMN "Total MB"  format 99,999,999

SELECT fs.tablespace_name "Tablespace",
      (df.totalspace - fs.freespace) "Used MB",
      fs.freespace "Free MB",
      df.totalspace "Total MB",
      ROUND (100 * (fs.freespace / df.totalspace)) "Pct. Free"
  FROM (SELECT  tablespace_name, ROUND (SUM (BYTES) / 1024 / 1024)
                                                                  totalspace
            FROM dba_data_files
        GROUP BY tablespace_name) df,
      (SELECT  tablespace_name, ROUND (SUM (BYTES) / 1024 / 1024) freespace
            FROM dba_free_space
        GROUP BY tablespace_name) fs
WHERE df.tablespace_name = fs.tablespace_name
  AND fs.tablespace_name='DAT';


**dba_data_files和dba_free_space都是Oracle自带的字典表,dba_data_files查表空间的大小,dba_free_space查表空间的自由空间大小,都需要DBA权限或者select any dictionary权限也可。


**空间没有了,方法三个

1. 加入一个新的datafile
SQL>alter tablespace ts1 add datafile '' .....;


2.设置datafile autoextend on
SQL>alter database datafile 3 autoextend on;

3. resize datafile 不推荐
SQL>alter database datafile 3 resize 1000M;

你可能感兴趣的:(ORA-01653: unable to extend table XXXX by 8497 in tablespace DAT)