今天在往表里插入批量数据时,报如下的错误:
ORA-01536 超出表空间‘BOCI’的空间限量
开始以为是tablespace表空间不够用了,查询了一下表空间大小:
select ff.s tablespace_name, ff.b total, (ff.b-fr.b) usage, fr.b free, round((ff.b - fr.b)/ff.b * 100) || '% ' usagep from (select tablespace_name s, sum(bytes)/1024/1024 b from dba_data_files group by tablespace_name) ff, (select tablespace_name s, sum(bytes)/1024/1024 b from dba_free_space group by tablespace_name) fr where ff.s = fr.s
|
执行查询的SQL结果如下:
tablespace_name |
Total |
USAGE |
FREE |
USAGEP |
BOCI |
100 |
72.25 |
27.75 |
72% |
看这个结果应该不是表空间的大小问题,后来网上搜索了一下,如下解释:
ora-1536 是指的你建表的那个user 所能使用的空间没有了,不是那个表所在的tablespace 没有free space 了。你需要做的是给那个user 对那个tablespace 有更多的space 可以使用。 |
于是按照达人的指点,执行下面的SQL解决了我的问题:
ALTER USER <username> QUOTA <integer> [K/M] ON <tablespacename>;
按照上面的语法,结合我的数据库实际情况,执行:
ALTER USER BOCI QUOTA 200M ON BOCI;
|
大功告成!
阅读(616) | 评论(0) | 转发(0) |