New in Oracle 11g: Read Only Tables

3

In Oracle 11g database it is possible to make a table really read only, also for the owner of that table. Until now a table could only be made read only to other users, by granting only the select privilege to these users. But the owner of the table was always able to do updates and inserts. With the new statement: alter table <table name> read only the table is really read only. And you can reverse it again with: alter table <table name> read write. A small example: ....

SQL&gt; alter table emp read only;

Table altered.

SQL&gt; update emp
2  set comm = comm * 1.1;
update emp
*ERROR at line 1:ORA-12081: update operation not allowed on table "JURGEN"."EMP"

SQL&gt; alter table emp read write;

Table altered.

SQL&gt; update emp
2  set comm = comm * 1.1;

14 rows updated.

SQL&gt;
Share.

About Author

3 Comments