I faced 2 different kind of ORA error during the practice on oraclesome year ago. I found below script from my data. And think this to post on vlblog to help others as well.
In below example a tablespace is created of small size 1MB and created a user whose tablespace default set to newly created tablespace. THis is done so that what ever data is inserted for this user in object will be stored on test tablespace.
So create a object and below is the open PLSQL which will insert records in loop.
While inserting error "ORA-01653: unable to extend table" popout, below the solution also available for this ORA error.
create tablespace test datafile 'E:\APP\ORACLE\ORADATA\ORCL\test01.DBF' size 1M ;
create user C##denz identified by denz container=all;
grant dba to c##denz;
alter user c##denz default tablespace test;
create table loop_insert( a number , b varchar2(100));
declare
begin
for i in 1..20000 loop
insert into loop_insert (a, b) (select i , 'test'||i from dual);
end loop;
end;
/
ERROR at line 1:
ORA-01653: unable to extend table C##DENZ.LOOP_INSERT by 8 in tablespace TEST
ORA-06512: at line 4
alter tablespace test autoextend on;
Error report:
SQL Error: ORA-32773: operation not supported for smallfile tablespace TEST
32773. 00000 - "operation not supported for smallfile tablespace %s"
*Cause: An attempt was made to perform an operation which is supported
only for bigfile tablespaces, e.g. resize tablespace.
*Action: Use the appropriate clause of the ALTER DATABASE DATAFILE
command instead.
alter database datafile 'E:\APP\ORACLE\ORADATA\ORCL\TEST01.DBF' autoextend on;
In below example a tablespace is created of small size 1MB and created a user whose tablespace default set to newly created tablespace. THis is done so that what ever data is inserted for this user in object will be stored on test tablespace.
So create a object and below is the open PLSQL which will insert records in loop.
While inserting error "ORA-01653: unable to extend table" popout, below the solution also available for this ORA error.
create tablespace test datafile 'E:\APP\ORACLE\ORADATA\ORCL\test01.DBF' size 1M ;
create user C##denz identified by denz container=all;
grant dba to c##denz;
alter user c##denz default tablespace test;
create table loop_insert( a number , b varchar2(100));
declare
begin
for i in 1..20000 loop
insert into loop_insert (a, b) (select i , 'test'||i from dual);
end loop;
end;
/
ERROR at line 1:
ORA-01653: unable to extend table C##DENZ.LOOP_INSERT by 8 in tablespace TEST
ORA-06512: at line 4
alter tablespace test autoextend on;
Error report:
SQL Error: ORA-32773: operation not supported for smallfile tablespace TEST
32773. 00000 - "operation not supported for smallfile tablespace %s"
*Cause: An attempt was made to perform an operation which is supported
only for bigfile tablespaces, e.g. resize tablespace.
*Action: Use the appropriate clause of the ALTER DATABASE DATAFILE
command instead.
alter database datafile 'E:\APP\ORACLE\ORADATA\ORCL\TEST01.DBF' autoextend on;