
Originally Posted by
BV1963
I think it will not do it. If I make a tablespace read only than DML will fail before I even get to commit.
Any other idea?
1* ALTER TABLESPACE psdefault read only
HCMDEV:SYSTEM> /
Tablespace altered.
HCMDEV:SYSTEM>
HCMDEV:SYSTEM> insert into ORACLETEST values ('11111');
insert into ORACLETEST values ('11111')
*
ERROR at line 1:
ORA-00372: file 3 cannot be modified at this time
ORA-01110: data file 3: '/u03d/oradata/HCMDEV/psdefault.dbf'
Try savepoint method:
Code:
SQL> create table T99 (id int) ;
Table created.
SQL> savepoint abc ;
Savepoint created.
SQL> insert into T99 values (100) ;
1 row created.
SQL> rollback to ABC ;
Rollback complete.
SQL> commit ;
Commit complete.
SQL> select * from T99 ;
no rows selected
Tamil