Read Only Tables

The question "How do I make a table read only" has appeared more
than once in this forum.

The answer has always been "you can't".

That answer appears to have been incorrect.

This site has an ingenious and effective method for effectively
making a table read only.

http://oraqa.com/2006/01/09/how-to-set-a-table-in-read-only-mode/

I saw this today on Tom Kyte's blog
http://tkyte.blogspot.com/2006/01/new-questionanswer-site.html

Here's a test:

11:11:41 SQL>create table dv ( id number(12));

Table created.

11:11:41 SQL>
11:11:41 SQL>alter table dv add constraint dv_read_only check(1=1) disable
validate;

Table altered.

11:11:41 SQL>
11:11:41 SQL>insert into dv(id) values(1);
insert into dv(id) values(1)
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (
JS001292.DV_READ_ONLY) disabled and
validated


--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: